mxnet
mxnet copied to clipboard
Predict using GPU
How can I predict on my validation dataset using GPU, after loading a model? I've trained my model on GPU and then I saved it from terminal, but when I load the model for doing predictions only CPU is used:
model_loaded = mx.model.FeedForward.load(prefix, iteration)
preds=model_loaded.predict(validation_dataset)
How can I predict with GPU instead of CPU, since there are no ctx parameters in the predict function? Thanks!
model_loaded = mx.model.FeedForward.load(prefix, iteration, ctx=mx.gpu())
preds=model_loaded.predict(validation_dataset)
Thanks!!