You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi there,
After the model is trained, I need to use the model to generate predictions with my test dataset, instead of just getting a single accuracy (so eval() won't be enough). However, the model.predict did not work. If I do model.predict(test_loader), it gives an error:
ValueError: The type of input X should be one of {{torch.Tensor, np.ndarray}}.
if I do model.predict(*test_loader) it gives an error:
[/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py](https://localhost:8080/#) in _call_impl(self, *input, **kwargs)
1128 if not (self._backward_hooks or self._forward_hooks or self._forward_pre_hooks or _global_backward_hooks
1129 or _global_forward_hooks or _global_forward_pre_hooks):
-> 1130 return forward_call(*input, **kwargs)
1131 # Do not call functions when jit is used
1132 full_backward_hooks, non_full_backward_hooks = [], []
TypeError: forward() takes 2 positional arguments but 191 were given
The text was updated successfully, but these errors were encountered:
Hi there,
After the model is trained, I need to use the model to generate predictions with my test dataset, instead of just getting a single accuracy (so eval() won't be enough). However, the model.predict did not work. If I do
model.predict(test_loader)
, it gives an error:if I do
model.predict(*test_loader)
it gives an error:The text was updated successfully, but these errors were encountered: