super-gradients
super-gradients copied to clipboard
RuntimeError: Input type (unsigned char) and bias type (float) should be the same
After running the below code for predicting a single image I got this error
test_image = '08927.jpg' best_model.predict(test_image).show()
RuntimeError: Input type (unsigned char) and bias type (float) should be the same
Can you please provide a bit more context?
What is best_model
and how you instantiated it?
If there is a link to Colab notebook that we can try to reproduce the issue it would help to address your issue in timely manner.
@Satyajit1993 I have had the same problem, it seems to be a bug with the new versions. In my case at least, setting the version to 3.1.1 (pip install super-gradients==3.1.1
) fixes the problem in inference. Also, models trained with higher versions of the library are backward compatible (at least in inference) so, even if you train a model with a higher version, you will be able to do inference with 3.1.1.
This solved it. The version with which I trained was 3.1.2
, after creating a separate environment with 3.1.1
it started working!
Will try to check if there is something more to this, or is it a bug.