简体   繁体   English

由于缓存奇怪问题,使用自己的数据集训练神经网络不起作用

[英]Training neural network with own dataset doesn't work due to cache strange problem

I faced a strange challenge trying to train neural network using code from github, it is huggingface conversational model.我在尝试使用 github 中的代码训练神经网络时遇到了一个奇怪的挑战,它是拥抱面会话 model。

What happens: even i use my own dataset for training result remains the same like with original dataset.会发生什么:即使我使用自己的数据集进行训练,结果仍然与原始数据集相同。 My hypothesis that it is a somehow cache problem - old dataset continuously get loaded from cached and replace my.我假设这是一个缓存问题 - 旧数据集不断从缓存中加载并替换我的。 Them when i launch actual interactive session with neural network it works, but without my data, even if i pass model checkpoint.当我使用神经网络启动实际的交互式 session 时,它们可以工作,但没有我的数据,即使我通过了 model 检查点。

Why i think of cache: in this repo author use automatic downloading and caching neural network model in /home/joo/.cache/torch/pytorch_transformers/ if no parameter specified in terminal.为什么我想到缓存:在这个 repo 中,如果终端中没有指定参数,作者在 /home/joo/.cache/torch/pytorch_transformers/ 中使用自动下载和缓存神经网络 model。

I have created an issue on Github.我在 Github 上创建了一个问题。 BUT i am not sure is that a problem specific for this repo only, or it is a common problem with retraining neural networks i faced first time.但我不确定这是仅针对此 repo 的问题,还是我第一次遇到的重新训练神经网络的常见问题。

https://github.com/huggingface/transfer-learning-conv-ai/issues/36 https://github.com/huggingface/transfer-learning-conv-ai/issues/36

Some copypaste from issue:问题的一些复制粘贴:

I am still curious, was not able to pass my dataset:我仍然很好奇,无法通过我的数据集:

 I added to original 200mb json my personality trained once more with --dataset_path./my.json invoke interact.py with new checkpoint and path python./interact.py --model_checkpoint

./runs/Oct08_18-22-53_joo-tf_openai-gpt/ --dataset_path./my.json and it reports Gathered 18878 personalities (but not 18879, with my own). ./runs/Oct08_18-22-53_joo-tf_openai-gpt/ --dataset_path./my.json 它报告收集了 18878 个个性(但不是 18879,我自己的)。 I changed the code in interact.py to choose my first perosnality this way我更改了 interact.py 中的代码,以这种方式选择我的第一个 perosnality

was: personality = random.choice(personalities)是:个性=随机选择(个性)

become: personality = personalities[0]变成:个性=个性[0]

and this first personality is not mine.而这个第一人格不是我的。

Solved: it is a specific issue to this repo, just hardcoded dataset path.已解决:这是这个 repo 的一个特定问题,只是硬编码的数据集路径。 But still why it doesn't load first time - no answer但是为什么它第一次没有加载 - 没有答案

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM