Code Monkey home page Code Monkey logo

Comments (4)

HikaruSama233 avatar HikaruSama233 commented on May 25, 2024 3

是tensorflow的问题。具体的做法是用这个命令

python pytorch_transformers/convert_xlnet_checkpoint_to_pytorch.py --tf_checkpoint_path XLNet_zh_Large_L-24_H-1024_A-16/xlnet_model --xlnet_config_file XLNet_zh_Large_L-24_H-1024_A-16/xlnet_config.json --pytorch_dump_folder_path XLNet_zh_Large_L-24_H-1024_A-16

同时把xlnet_model.ckpt改名为xlnet_model.data-00000-of-00001,就是把ckpt去掉,这样tensorflow在读xlnet_model的时候会自动去找xlnet_model.data-00000-of-00001,xlnet_model.index,xlnet_model.meta这三个文件,然后就可以顺利转换了

from xlnet_zh.

Splendon avatar Splendon commented on May 25, 2024

你解决转化的问题没有啦

from xlnet_zh.

Splendon avatar Splendon commented on May 25, 2024

我用这行命令
python pytorch_transformers/convert_xlnet_checkpoint_to_pytorch.py --tf_checkpoint_path XLNet_zh_Large_L-24_H-1024_A-16/xlnet_model.ckpt --xlnet_config_file XLNet_zh_Large_L-24_H-1024_A-16/xlnet_config.json --pytorch_dump_folder_path XLNet_zh_Large_L-24_H-1024_A-16
而且,把xlnet_model.ckpt改名为xlnet_model.ckpt.data-00000-of-00001,就可以顺利转换了

from xlnet_zh.

jiangix01 avatar jiangix01 commented on May 25, 2024

我用这行命令
python pytorch_transformers/convert_xlnet_checkpoint_to_pytorch.py --tf_checkpoint_path XLNet_zh_Large_L-24_H-1024_A-16/xlnet_model.ckpt --xlnet_config_file XLNet_zh_Large_L-24_H-1024_A-16/xlnet_config.json --pytorch_dump_folder_path XLNet_zh_Large_L-24_H-1024_A-16
而且,把xlnet_model.ckpt改名为xlnet_model.ckpt.data-00000-of-00001,就可以顺利转换了

谢谢谢谢,我这边还是会报错,看了一下可能是pytorch_transformers已经更新了,所以这条命令会报错,如果您方便的话可以麻烦将您用于转化的pytorch_transformers文件夹发给我一下吗?真的非常感谢~我的邮箱是[email protected]

from xlnet_zh.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.