zoukankan      html  css  js  c++  java
  • Tensorflow 模型转换到Pytorch

    A command-line interface is provided to convert original Bert/GPT/GPT-2/Transformer-XL/XLNet/XLM checkpoints in models than be loaded using the from_pretrained methods of the library.

    example:

    export BERT_BASE_DIR=/path/to/bert/uncased_L-12_H-768_A-12
    
    transformers-cli convert --model_type bert 
      --tf_checkpoint $BERT_BASE_DIR/bert_model.ckpt 
      --config $BERT_BASE_DIR/bert_config.json 
      --pytorch_dump_output $BERT_BASE_DIR/pytorch_model.bin

    https://huggingface.co/transformers/converting_tensorflow_models.html

    时刻记着自己要成为什么样的人!
  • 相关阅读:
    E
    C
    航空母舰-03
    航空母舰-02
    航空母舰-01
    新概念4-30
    html
    翁凯-编程学习方法
    机器学习Ng-02
    民法-钟秀勇-导学
  • 原文地址:https://www.cnblogs.com/demo-deng/p/15124326.html
Copyright © 2011-2022 走看看