ValueError: Cannot reset context for Parameter 'fcn6_resnetv1b0_conv0_weight' because it has not been initialized


#1

I have been trying to use the “Train FCN on Pascal VOC Dataset” train.py for a while and cannot figure out how to fix this error. I am trying to train using a single gpu.

My understanding is that I have to initialize the model on gpu but I am not sure how:

create network

    model = get_segmentation_model(model=args.model, dataset=args.dataset,
                                   backbone=args.backbone, norm_layer=args.norm_layer,
                                   norm_kwargs=args.norm_kwargs, aux=args.aux)
    model.cast(args.dtype)
    print(model)
    self.net = DataParallelModel(model, args.ctx, args.syncbn)
    self.evaluator = DataParallelModel(SegEvalModel(model), args.ctx)

I would be thankful for advise