Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
Fix undefined error in image segmentation
Browse files Browse the repository at this point in the history
ctx is used undefined. Setting the default ctx to cpu and
editing the comment to let the user know that it can be
changed to GPU as required.
  • Loading branch information
vandanavk committed Aug 2, 2018
1 parent 564e01a commit f0290fe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions example/fcn-xs/image_segmentaion.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ def main():
model_prefix = "FCN8s_VGG16"
epoch = 19

# By default, MXNet will run on the CPU. Uncomment the line below to execute on the GPU
# ctx = mx.gpu()
# By default, MXNet will run on the CPU. Change to ctx = mx.gpu() to run on GPU.
ctx = mx.cpu()

fcnxs, fcnxs_args, fcnxs_auxs = mx.model.load_checkpoint(model_prefix, epoch)
fcnxs_args["data"] = mx.nd.array(get_data(args.input), ctx)
Expand Down

0 comments on commit f0290fe

Please sign in to comment.