FrozenGene commented on a change in pull request #4990: [TF][Relay] BatchNorm
support with run-time mean and variance calculation
URL: https://github.com/apache/incubator-tvm/pull/4990#discussion_r388914223
##########
File path: python/tvm/relay/frontend/tensorflow.py
##########
@@ -887,7 +887,15 @@ def _impl(inputs, attr, params):
if 'U' in attr:
need_cast = True
inputs[0] = _op.cast(inputs[0], dtype=attr['U'].name)
-
+ # Check if mean and variance are empty
+ # If so, replace them with Mean and Variance Ops
+ # For run-time calculation
+ assert len(inputs) == 5
Review comment:
Let us move `CHECK` to the beginning of this function (line 880). Because
line 889 also access `inputs[0]`.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services