Repository navigation
Loading Sagemaker NTM Artifacts #16230
Replies: 3 comments 1 reply
|
@salmanmashayekh is there any code piece available to reproduce? |
|
Thank you both @lanking520 and @ThomasDelteil! Here is a MWE: The training log is as follows: When the training is done, it generates the following zip file, which includes a I am trying to load the Can you share the code snippet to create an mxnet model with the artifacts and predict on the |
|
Hey @salmanmashayekh did you ever get this working? Using your code: sym, arg_params, aux_params = mx.model.load_checkpoint('model_algo-1', 0)
module_model = mx.mod.Module(symbol=sym, label_names=None, context=mx.cpu())
module_model.bind(
for_training = False,
data_shapes = [('data', (1, VOCAB_SIZE))]
)Runs fine for me, the next step for inference I assume is to set: module_model.set_params(arg_params=arg_params, aux_params=aux_params)But this throws an error, which requests epochs, but I am not sure why this is needed for prediction... Small update: setting module_model.set_params(arg_params=arg_params, aux_params=aux_params, allow_missing=True)But calling predict, gives an odd output! module_model.predict(x)OUTPUT: |
Uh oh!
There was an error while loading. Please reload this page.
I have trained a Neural Topic Model with Sagemaker and now I am trying to load/deploy the model locally. The artifacts include a
symboland an aparametersfile.I am using the following to load the model:
But when I try to
bindthe model:It fails with the following error:
From the model architecture (https://arxiv.org/pdf/1809.02687.pdf), I know that the input data shape is a vector with
VOCAB_SIZElength.Any ideas what I am doing wrong?
All reactions