Coopercoppers / PFN

EMNLP 2021 - A Partition Filter Network for Joint Entity and Relation Extraction
MIT License
171 stars 20 forks source link

OOM for my own bigger datasets #14

Closed AndDoIt closed 2 years ago

AndDoIt commented 2 years ago

When I finished the model training and began to test, the OOM occurred, since the model does not optimize with multi-gpu, did you have this problem before?

Coopercoppers commented 2 years ago

It happens because in line 166 and 218 of model.py, the number of dimensions are too big, like if you have 100 words, with batch size of 20 and 300 hidden state neurons, the operation would process (100 100 20 900 times 900 300) this much dimensions. You either reduce the hidden neurons or batch size, or you get a GPU with greater memory capacity.

AndDoIt commented 2 years ago

Thanks a lot, I solved it!