I’ve successfully trained a structured data model on the UCI Occupancy dataset and am running into issues when I attempt to predict for a single row of data (versus my batch size - 64 rows).
I have been following this link to deploy my model into a microservice but am unable to even get the model to predict after saving and loading it with PyTorch.
In addition to attaching my notebook, the steps I am taking are:
- Load PyTorch Model
learn2 = torch.load(‘notify_min_v1.1.pt’) - Load test dataset and grab next cat and cont tensors.
cat = V(next(iter(md.test_ds.cats)))
cont = V(next(iter(md.test_ds.conts))) - Passing the cat and cont variables to the model to predict.
preds2 = learn2(cat, cont)
Full notebook: https://drive.google.com/file/d/1oGZtmIShIOT-LlryL0co8gIebBnQz76X/view?usp=sharing