From bf90f63a30556ee0ec5fd8a3ec267431a34a6745 Mon Sep 17 00:00:00 2001 From: tornadomeet Date: Wed, 23 Dec 2015 14:35:12 +0800 Subject: [PATCH] update name --- example/fcn-xs/image_segmentaion.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/example/fcn-xs/image_segmentaion.py b/example/fcn-xs/image_segmentaion.py index 04510a933d1e..56c7482fcb81 100644 --- a/example/fcn-xs/image_segmentaion.py +++ b/example/fcn-xs/image_segmentaion.py @@ -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)))