Kyubyong / transformer

A TensorFlow Implementation of the Transformer: Attention Is All You Need
Apache License 2.0
4.28k stars 1.3k forks source link

train error #175

Open JLUForever opened 3 years ago

JLUForever commented 3 years ago

When I execute the "train.py" file, I met an error below:

2021-08-08 10:52:09.820154: W tensorflow/core/framework/op_kernel.cc:1273] OP_REQUIRES failed at matmul_op.cc:478 : Resource exhausted: OOM when allocating tensor with shape[12544,2048] and type float on /job:localhost/replica:0/task:0/device:GPU:0 by allocator GPU_0_bfc

My GPU is a GeForce GTX 1080.

I changed the vocab_size from 32000 to 2000, but it didn't work, what should I do?