Skip to content

Commit

Permalink
update name
Browse files Browse the repository at this point in the history
  • Loading branch information
tornadomeet authored and wuwei committed Dec 30, 2015
1 parent 3a66df2 commit bf90f63
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions example/fcn-xs/image_segmentaion.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ def get_data(img_path):
return img

def main():
fcn32s, fcn32s_arg_params, fcn32s_aux_params = mx.model.load_checkpoint(model_previx, epoch)
fcn32s_arg_params["data"] = mx.nd.array(get_data(img), ctx)
data_shape = fcn32s_arg_params["data"].shape
fcnxs, fcnxs_args, fcnxs_auxs = mx.model.load_checkpoint(model_previx, epoch)
fcnxs_args["data"] = mx.nd.array(get_data(img), ctx)
data_shape = fcnxs_args["data"].shape
label_shape = (1, data_shape[2]*data_shape[3])
fcn32s_arg_params["softmax_label"] = mx.nd.empty(label_shape, ctx)
exector = fcn32s.bind(ctx, fcn32s_arg_params ,args_grad=None, grad_req="null", aux_states=fcn32s_arg_params)
fcnxs_args["softmax_label"] = mx.nd.empty(label_shape, ctx)
exector = fcnxs.bind(ctx, fcnxs_args ,args_grad=None, grad_req="null", aux_states=fcnxs_args)
exector.forward(is_train=False)
output = exector.outputs[0]
out_img = np.uint8(np.squeeze(output.asnumpy().argmax(axis=1)))
Expand Down

0 comments on commit bf90f63

Please sign in to comment.