brightmart / roberta_zh

RoBERTa中文预训练模型: RoBERTa for Chinese
2.62k stars 409 forks source link

想尝试转换,用tf.train.list_variables(init_checkpoint)加载模型报错 #19

Closed wang001 closed 5 years ago

wang001 commented 5 years ago

bert-wwm-ext就可以正常使用,这个不可以。

brightmart commented 5 years ago

看看这个:https://github.com/brightmart/roberta_zh/issues/15 应该是文件名的问题

wang001 commented 5 years ago

就是我告诉他文件名不对的。。。。。我发现在执行这行的时候,磁盘在疯狂写入,然后就没有任何异常的退出。

wang001 commented 5 years ago

Python 3.7.4 (default, Aug 9 2019, 18:34:13) [MSC v.1915 64 bit (AMD64)] :: Anaconda, Inc. on win32 Type "help", "copyright", "credits" or "license" for more information.

import tensorflow as tf init_checkpoint = "F:/pretrain/roeberta_zh_L-24_H-1024_A-16/roberta_l24_large_model" init_vars = tf.train.list_variables(init_checkpoint) 会直接退出python

wang001 commented 5 years ago

抱歉,可能是我的tensorflow有问题,虽然能正常跑代码,但是在别人的电脑上没有问题

wang001 commented 5 years ago

本来是1.14.0的。换成1.12.0就可以了