02 2021 档案
摘要:1. 使用ps查看相关进程 ps -elf | grep python 2. 使用awk提取进程pid ps -elf | grep python|awk '{print $4}' 这里不一定是$4,根据实际情况调整 3. 使用xargs传参并执行kill ps -elf | grep python
阅读全文
摘要:问题 训练模型时,训练到第2个epoch时程序无缘无故消失,没有打印任何异常日志 定位方法 程序加try catch,捕获异常日志,运行python时使用如下命令记录error信息 nohup python xxx.py > nohup.out 2>&1 & 结果:nohup没有记录任何信息,训练过
阅读全文
摘要:github: https://github.com/haibincoder/NlpSummary/tree/master/torchcode/classification 使用TextCNN实现文本分类 使用LSTM实现文本分类 使用Transformers实现文本分类 import copy f
阅读全文
摘要:github: https://github.com/haibincoder/NlpSummary/tree/master/torchcode/classification 使用TextCNN实现文本分类 使用LSTM实现文本分类 使用Transformers实现文本分类 import torch
阅读全文
摘要:github: https://github.com/haibincoder/NlpSummary/tree/master/torchcode/classification 使用TextCNN实现文本分类 使用LSTM实现文本分类 使用Transformers实现文本分类 # model # cod
阅读全文
摘要:问题 在清华新闻分类数据集上,使用TextCNN效果不错,使用TextLSTM/RNN学习不动,损失和acc均无变化 定位问题 CNN效果有提升,说明train代码和数据没问题; 更改RNN/LSTM结构,加损失函数还是没效果; 修改lr、embed_dim,num_laber均无效果; 本地一步步
阅读全文
摘要:信息熵 信息熵也被称为熵,用来表示所有信息量的期望。 公式如下: 例如在一个三分类问题中,猫狗马的概率如下: |label|猫|狗|马| |:--|:--|:--|:--| |predict|0.7|0.2|0.1| |信息量|-log(0.7)|-log(0.2)|-log(0.1)| 信息熵为:
阅读全文