tvm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [incubator-tvm] lfengad commented on issue #4990: [TF][Relay] BatchNorm support with run-time mean and variance calculation
Date Fri, 06 Mar 2020 02:11:07 GMT
lfengad commented on issue #4990: [TF][Relay] BatchNorm support with run-time mean and variance
calculation
URL: https://github.com/apache/incubator-tvm/pull/4990#issuecomment-595562012
 
 
   > > Yeah, our current implementation is just to check whether `mean` / `variance`
is empty `VarNode` (with zero dimension), and then call `Mean` and `Variance` in BatchNormToInferUnpack.
   > 
   > I think our pr could remove `name_hint` too.
   Yeah, I agree that the better way should be removing `name_hint` and just checking whether
the `mean` and `variance` are empty inside `BatchNormToInferUnpack`, with no need to modify
the tensorflow frontend. Previously I have tried this way but got come compilation errors
related with layout checking. If we plan to do in this way, we need to modify the layout checking
of `batch_norm` operator too. 
   > 
   > > if mean / variance is VarNode but with non-zero dimension, it still has the possibility
to hold the given pre-defined constant values and thus cannot be replaced with Mean \ Variance.
   > 
   > Could you give us an example of this condition? I could only imagine models have empty
or full pre-defined values. So we should only to calculate it by calling `Mean` / `Variance`
feed by `data` or our current implementation of `BatchNormToInferUnpack `.
   What I mean is that for both cases the `mean` and `variance` are `VarNode`. In one case
the `VarNode` is empty without pre-defined values, while in the other case the `VarNode` is
not empty with pre-defined values. 
   Thank you for the discussion!
   
   
   

----------------------------------------------------------------
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