tvm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [incubator-tvm] FrozenGene commented on a change in pull request #4990: [TF][Relay] BatchNorm support with run-time mean and variance calculation
Date Fri, 06 Mar 2020 10:59:58 GMT
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_r388840561
 
 

 ##########
 File path: python/tvm/relay/frontend/tensorflow.py
 ##########
 @@ -887,7 +887,14 @@ 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
+        moving_mean_shape = [int(n) for n in inputs[3].type_annotation.shape]
 
 Review comment:
   The `CHECK` means `assert`. 
   
   Yes, `CHECK` the number of nodes, so that we could visit `inputs[3]` / `inputs[4]` and
so on safely.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message