chinese-poem-generator.js icon indicating copy to clipboard operation
chinese-poem-generator.js copied to clipboard

Memory usage and optimization

Open c4b4d4 opened this issue 3 years ago • 0 comments

Hello @DavidCai1993, I cloned your repo to learn about training an algorithm to generate sentences. And I'm glad I found it, thanks for sharing it.

I'm having a little issue here. I've seen that you use const batchSize = 3000 to train the algorithm, but this increases a lot the memory usage, at least on my configured setup. I own a 2070 RTX.

How do you manage to train a batch so big?

The maximum I manage to train is a batch size of 350. Bigger than this number I always end up consuming the whole 8GB of my GPU.

c4b4d4 avatar Jun 02 '21 01:06 c4b4d4