You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2020/03/11 14:25:41 UTC

[GitHub] [incubator-tvm] Msabih commented on issue #4262: [RELAY][Bug] 'name_hint' AttributeError issue when covert tensorflow to TVM

Msabih commented on issue #4262: [RELAY][Bug] 'name_hint' AttributeError issue when covert tensorflow to TVM
URL: https://github.com/apache/incubator-tvm/issues/4262#issuecomment-597665090
 
 
   If you check the class method _impl_v9 of class Upsample, this is line 778 on tvm 0.7
   
               assert len(inputs) == 2, "Upsample op take 2 inputs, {} given".format(len(inputs))
               scales = params[inputs[1].name_hint].asnumpy()
   
   The error comes at this line
              scales = params[inputs[1].name_hint].asnumpy()
   
   I found out that there was incompatibility between how pytorch exported upsample operator in onnx and how tvm imported. The fault might be on pytorch's side or tvm's side, I am not sure.
   
   But I got the hack to get my network working because all of its upsample were by a factor of 2. So I manually supplied the scales value as follows
   
   # comment the error giving line
   # scales = params[inputs[1].name_hint].asnumpy() 
   
   # manually supply the scales value
   scales = np.array([1.0, 1.0, 2.0, 2.0])
   
   Could the people having problem with tensorflow verify if manually supplying the scales value gets rid of the error ? 
   

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