Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

paddlehub使用ernie2.0-en,修改网络结构后微调时自动重启 #580

Open
yaweisun opened this issue May 10, 2020 · 2 comments
Open
Assignees

Comments

@yaweisun
Copy link

yaweisun commented May 10, 2020

  • 版本、环境信息
    1)PaddleHub和PaddlePaddle版本:请提供您的PaddleHub和PaddlePaddle版本号,例如PaddleHub1.6.0,PaddlePaddle1.7.1
    2)系统环境:AiStudio的GPU环境

  • 复现信息:
    做序列标注任务,feed_list如下:

feed_list = [
    inputs["input_ids"].name, inputs["position_ids"].name,
    inputs["segment_ids"].name, inputs["input_mask"].name,
    "freq_ids"
]

Dataset和Reader都做了相应修改,
网络的结构的修改如下:

class SciIETask(SequenceLabelTask):
    def _build_net(self):
        freq_ids = fluid.data(
            name='freq_ids', shape=[-1, self.max_seq_len], dtype='int64'
        )
        freq_embedding = fluid.embedding(input=freq_ids, size=[11, 5])
        feature_concat = fluid.layers.concat([self.feature, freq_embedding], axis=-1)
    ......

然后用feature_concat代替self.feature传入下层网络。

  • 出现的问题:
    运行seq_label_task.finetune()后自动重启。
@Steffy-zxf
Copy link
Contributor

@yaweisun 你好!你说的自动重启是什么意思? 你是在AIStudio上运行吗?如果是的话,参考 issue #540

@Steffy-zxf Steffy-zxf self-assigned this May 11, 2020
@yaweisun
Copy link
Author

@yaweisun 你好!你说的自动重启是什么意思? 你是在AIStudio上运行吗?如果是的话,参考 issue #540

您好,试过了,不行,batch_size改成2也不行,还是出现同样的问题。“自动重启”的意思就是运行seq_label_task.finetune()后,程序运行到出现日志信息PaddleHub finetune start之后没多久,右上角现实运行中空闲中的那个未知,显示重启中
而且打开性能监控之后发现CPU和GPU资源基本都没使用。改网络之前batch_size设置成32都没有问题,不知道是不是网络结构的问题。
项目地址是:
https://aistudio.baidu.com/aistudio/projectdetail/457592

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants