Closed carlo-veezoo closed 6 years ago
You’re right. What I was doing there doesn’t make any sense actually. I think we should avoid the dynamic assert due to performance reasons, as you also mention. It’s safe to assume this will always hold given that it’s always aggregating gradients generated for the same arguments. Let’s just leave it with no assertion for now. :)
The assertion in
addNOutputIndexedSlices
is overly restrictive, because thedenseShape
might be always equal during execution despite the associatedOutput
being different. This breaks the following code:I hesitated to add a
tf.assert
to dynamically check the shape, but I don't think you would always want that because of the possible slowdown.