
NLP
Samuel_0
这个作者很懒,什么都没留下…
展开
-
使用transformers库中的convert_pytorch_checkpoint_to_tf,转换pytorch的bert模型成TF格式
可以使用convert_pytorch_checkpoint_to_tf.py将pytorch版本的 bert模型转换为TF版本的bert模型,不过需要注意的是需要将程序进行一定的修改: 原始代码: model = BertModel.from_pretrained( pretrained_model_name_or_path=args.model_name, state_dict=torch.load(args.pytorch_model_path),原创 2021-12-28 10:34:34 · 1790 阅读 · 0 评论 -
keras-contrib包安装以及kerasBi_LSTM
keras-contrib 安装: (pip install git+https://www.github.com/farizrahman4u/keras-contrib.git) 码一下,学习学习 原文见:https://blog.youkuaiyun.com/qq_16912257/article/details/78969966转载 2018-12-10 19:57:24 · 2660 阅读 · 3 评论