braindotai commented on issue #15504: Saved model and then looked at the output of the same batch after loading, got different results! URL: https://github.com/apache/incubator-mxnet/issues/15504#issuecomment-510829624 Make sure you are saving and loading the model from the same path. I've tested the code below and it is working fine. ```python for batch in data_iter: model.forward(batch) out1 = model.get_outputs()[0] break model.save_checkpoint('model', epoch = 0) sym, arg_params, aux_params = mx.model.load_checkpoint('model', epoch = 0) model.set_params(arg_params, aux_params) model.forward(batch) out2 = model.get_outputs()[0] print(f'diff_output:{nd.abs(out1 - out2)}') ``` Output is all zeros.
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services