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
importpytensorimportpytensor.tensorasptx=pt.vector("x", dtype="int64")
out=pt.special.softmax(x)
# Doesn't seem rightout.dprint(print_type=True)
# Softmax{axis=None} [id A] <Vector(int64, shape=(?,))># └─ x [id B] <Vector(int64, shape=(?,))># No complaintsfn=pytensor.function([x], out)
fn([1, 2, 3]) # TypeError: not a float
We should either raise at graph definition time, or cast the input to float. Scipy is happy to take integers (and return floats), so we could try to do the same.
The text was updated successfully, but these errors were encountered:
Description
Brought up in #846
We should either raise at graph definition time, or cast the input to float. Scipy is happy to take integers (and return floats), so we could try to do the same.
The text was updated successfully, but these errors were encountered: