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
We are inconsistent in what Ops we allow runtime broadcasting and which we don't.
importpytensor.tensorasptx=pt.vector("x", shape=(None,)) # Not known to have length 1 at runtimeout=pt.alloc(x, 3, 5)
try:
out.eval({x: [1]})
exceptExceptionase:
print(str(e).splitlines()[0])
# Runtime broadcasting not allowed. The output of Alloc requires broadcasting a dimension of the input value, which was not marked as broadcastable. If broadcasting was intended, use `specify_broadcastable` on the relevant input.out=pt.zeros((10, 10))[[5, 6, 7], [0, 1, 2]].inc(x)
try:
out.eval({x: [1]})
exceptExceptionase:
print(str(e).splitlines()[0])
else:
print("Did not raise")
# Did not raise
Note that whenever we allow runtime broadcasting will have a wrong gradient wrt to that broadcasted input, since we never implemented a mechanism to reduce runtime broadcasted dimensions.
Description
We are inconsistent in what Ops we allow runtime broadcasting and which we don't.
Note that whenever we allow runtime broadcasting will have a wrong gradient wrt to that broadcasted input, since we never implemented a mechanism to reduce runtime broadcasted dimensions.
The text was updated successfully, but these errors were encountered: