You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2019/09/20 13:25:25 UTC

[GitHub] [incubator-mxnet] ybz79 opened a new issue #16227: How to use a pre-trained model in model zoo as a sub-block in my own model?

ybz79 opened a new issue #16227: How to use a pre-trained model in model zoo as a sub-block in my own model? 
URL: https://github.com/apache/incubator-mxnet/issues/16227
 
 
   ## Description
   I want to use a pretrained model in the model zoo (such as BERT) as a layer in my own model. 
   ```python
      class Mymodel(nn.Block):
           def __init__(bert_model):
                  self.bert = bert_model
                  .....
   
     
     bert_model = get_model(....)
     model = Mymodel(bert_model)
   ```
   
   But I have a small problem about the naming, since bert_model and other parameters in my own model didn't have a same prefix, which can cause error in model.save_params()
   , how can I slove this problem?

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