I’m trying to rebuild the or load the saved model in R. I’m not sure if this is doable since I can find very limited documentation or examples on this.
I used gluon to build and save the model in python.
I have successfully loaded the model and predicted using mxnet syntax.
The code is below, but I cannot find similar syntax for mxnet in R:
sym, arg_p, aux_p = mx.model.load_checkpoint(‘mynet’, 0)
mod = mx.mod.Module(symbol=sym, context=ctx, label_names=None)
mod.bind(for_training=False, data_shapes=[(‘data’, (1,250,10))], label_shapes=mod._label_shapes)
mod.set_params(arg_p, aux_p, allow_missing=True)
data_iter = mx.io.NDArrayIter(data, None, 5120)
mod_y = mod.predict(data_iter)
Does anyone know how to do it in R or is it doable?