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
Despite having set floatX = pytensor.config.floatX = "float32", I'm getting type conversion errors when compiling some models. I have also checked to ensure that all data are float32 or int32
File ~/mambaforge/envs/pymc/lib/python3.10/site-packages/pytensor/tensor/type.py:272, in TensorType.filter_variable(self, other, allow_convert)
269 if other2 is not None:
270 return other2
--> 272 raise TypeError(
273 f"Cannot convert Type {other.type} "
274 f"(of Variable {other}) into Type {self}. "
275 f"You can try to manually convert {other} into a {self}."
276 )
TypeError: Cannot convert Type TensorType(float64, ()) (of Variable Reshape{0}.0) into Type TensorType(float32, ()). You can try to manually convert Reshape{0}.0 into a TensorType(float32, ()).
``
Unfortunately, the traceback does not provide sufficient feedback to isolate which line of model code is responsible for the error.
The text was updated successfully, but these errors were encountered:
fonnesbeck
changed the title
Type conversion error on compile
Type casting error on compile
Jan 2, 2023
I didn't really test float32 things at all yet. Sounds like what's happening is that nutpie itself currently only works with float64, and passes those into the logp function. I think numba is smart enough to handle that (although I woudn't be surprised if there are corner cases where things won't compile). But the aesara function that computes deterministics now receives float64 values, even though it expects float32.
Despite having set
floatX = pytensor.config.floatX = "float32"
, I'm getting type conversion errors when compiling some models. I have also checked to ensure that all data are float32 or int32The text was updated successfully, but these errors were encountered: