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 2022/04/24 12:12:47 UTC

[GitHub] [tvm] ah-cheng opened a new pull request, #11109: [Frontend][ONNX]fix dropout arguments have 3 arguments

ah-cheng opened a new pull request, #11109:
URL: https://github.com/apache/tvm/pull/11109

   According to the file:
   https://github.com/onnx/onnx/blob/main/docs/Operators.md#Dropout
   The `dropout` have 1-3 inputs `data , ratio , training_mode `.
   My model is:
   ![image](https://user-images.githubusercontent.com/50271153/164975749-8daff8d5-88d3-4c4c-9bfe-d28916cc0da9.png)
   But when I import the model and run.
   I got a error:
   ```
   dropout() takes from 1 to 2 positional arguments but 3 were given
   ```
   Therefore I reimplemented this Dropout class.


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

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] ah-cheng commented on pull request #11109: [Frontend][ONNX]fix dropout have 3 arguments

Posted by GitBox <gi...@apache.org>.
ah-cheng commented on PR #11109:
URL: https://github.com/apache/tvm/pull/11109#issuecomment-1109200268

   ahhh,,,  ok, thanks for your reply. I can study more from it. 


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

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] AndrewZhaoLuo commented on pull request #11109: [Frontend][ONNX]fix dropout have 3 arguments

Posted by GitBox <gi...@apache.org>.
AndrewZhaoLuo commented on PR #11109:
URL: https://github.com/apache/tvm/pull/11109#issuecomment-1108888774

   To answer your second question, `docker/lint.sh` runs linting test locally


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

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] AndrewZhaoLuo commented on pull request #11109: [Frontend][ONNX]fix dropout have 3 arguments

Posted by GitBox <gi...@apache.org>.
AndrewZhaoLuo commented on PR #11109:
URL: https://github.com/apache/tvm/pull/11109#issuecomment-1108889900

   Thank you for the contribution though, I recommend closing this for above reason. 
   
   Technically we do have a method of PRNG in TVM now, so you can try to implement dropout properly, but it is not very useful and a bit of rabbit hole 


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

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] ah-cheng commented on pull request #11109: [Frontend][ONNX]fix dropout have 3 arguments

Posted by GitBox <gi...@apache.org>.
ah-cheng commented on PR #11109:
URL: https://github.com/apache/tvm/pull/11109#issuecomment-1108359526

   This CI test error still because of remove `test_dropout_default` and `test_dropout_default_ratio` from `unsupported_onnx_tests`. This error is the same as my local build test case. The `ratio` is a Var. 
   So in the test case, I set the `ratio` to a const node. So I can test successed.
   question:
   From the file `nn.py`, The function `def Dropout`, we can know `rate` is a float type. So it should be a const???  I don`t know whether it is right.   If the `ratio` is a `Var` , the type should be a `tvm.relay.Expr`??? 
   
   
   
   


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

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] ah-cheng closed pull request #11109: [Frontend][ONNX]fix dropout have 3 arguments

Posted by GitBox <gi...@apache.org>.
ah-cheng closed pull request #11109: [Frontend][ONNX]fix dropout  have 3 arguments
URL: https://github.com/apache/tvm/pull/11109


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

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] ah-cheng commented on pull request #11109: [Frontend][ONNX]fix dropout have 3 arguments

Posted by GitBox <gi...@apache.org>.
ah-cheng commented on PR #11109:
URL: https://github.com/apache/tvm/pull/11109#issuecomment-1108177897

   How can I run lint test locally, please?  ~.~
   CC: @AndrewZhaoLuo 


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

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] AndrewZhaoLuo commented on pull request #11109: [Frontend][ONNX]fix dropout have 3 arguments

Posted by GitBox <gi...@apache.org>.
AndrewZhaoLuo commented on PR #11109:
URL: https://github.com/apache/tvm/pull/11109#issuecomment-1108888058

   So dropout at inference time should really be a no-op. Therefore, as TVM is primarily an inference framework (for now) we don't really handle dropout. In fact, somewhere along the line all dropout ops are replaced with no-ops. 
   
   I recommend, when you export your model, you set it in inference mode to solve this issue.
   
   Dropout has always been a tricky operator and I would not worry about it.


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

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org