Which line triggers that error? It seems the error is in the model itself, which is the only source code not available in the example.
As @Kushaj stated, try converting parameters to float or your input image to double (either).
But without reproducible code there is only so much we can do to help…