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

运行 python3 extract_tmx.py 内存不够 #5

Open
Kiteflyingee opened this issue Apr 8, 2018 · 1 comment
Open

运行 python3 extract_tmx.py 内存不够 #5

Kiteflyingee opened this issue Apr 8, 2018 · 1 comment

Comments

@Kiteflyingee
Copy link

Kiteflyingee commented Apr 8, 2018

大神你好,我16G内存,跑满了,最后写入文件的时候报 memoryerror,第一次用ElementTree,想只取一部分tu标签,如何实现,我看了api只有findall方法。或者有什么缩小内存占用的办法呢?

@qhduan
Copy link
Owner

qhduan commented Apr 8, 2018

你可以改一下,例如第36行那里

    if en and zh:
        x_data.append(en)
        y_data.append(zh)

限制x_data的大小,大于某个数字就停止了,先尝试训练小数据集

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