attention-translation-keras
attention-translation-keras copied to clipboard
Getting incorrect dimensions
I followed the exact commands mentioned in your readme and before training i am getting the following errors
ValueError: Error when checking target: expected time_distributed_1 to have 3 dimensions, but got array with shape (1120, 40005)
What version of tf and keras are you using?
tensorflow:-1.4.0 keras:-2.0.9
Could you try the latest verision keras and let me know.
Can you mention the version that you are using.It's too ambiguos to know what's the latest version means to be
I am getting the following errors after installing the following versions keras: 2.2.0 tensorflow: 1.8.0
Epoch 0
Epoch 1/1 2018-06-15 13:30:40.705992: I tensorflow/core/platform/cpu_feature_guard.cc:140] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA 2018-06-15 13:30:41.124806: W tensorflow/core/framework/allocator.cc:101] Allocation of 18003000 exceeds 10% of system memory. 2018-06-15 13:30:41.133977: W tensorflow/core/framework/allocator.cc:101] Allocation of 18003000 exceeds 10% of system memory. 2018-06-15 13:30:41.146665: W tensorflow/core/framework/allocator.cc:101] Allocation of 30725120 exceeds 10% of system memory. 2018-06-15 13:30:41.166433: W tensorflow/core/framework/allocator.cc:101] Allocation of 18003000 exceeds 10% of system memory. 2018-06-15 13:30:41.174544: W tensorflow/core/framework/allocator.cc:101] Allocation of 18003000 exceeds 10% of system memory. 2018-06-15 13:30:41.187663: W tensorflow/core/framework/allocator.cc:101] Allocation of 30725120 exceeds 10% of system memory. 2018-06-15 13:30:41.283361: W tensorflow/core/framework/allocator.cc:101] Allocation of 30725120 exceeds 10% of system memory. 2018-06-15 13:30:41.299205: W tensorflow/core/framework/allocator.cc:101] Allocation of 18003000 exceeds 10% of system memory. 2018-06-15 13:30:41.315461: W tensorflow/core/framework/allocator.cc:101] Allocation of 18003000 exceeds 10% of system memory. 2018-06-15 13:30:41.328358: W tensorflow/core/framework/allocator.cc:101] Allocation of 30725120 exceeds 10% of system memory. 2018-06-15 13:30:41.390824: W tensorflow/core/framework/allocator.cc:101] Allocation of 18003000 exceeds 10% of system memory. 2018-06-15 13:30:41.406671: W tensorflow/core/framework/allocator.cc:101] Allocation of 30725120 exceeds 10% of system memory. 2018-06-15 13:30:41.427286: W tensorflow/core/framework/allocator.cc:101] Allocation of 30725120 exceeds 10% of system memory. 2018-06-15 13:30:41.442281: W tensorflow/core/framework/allocator.cc:101] Allocation of 30725120 exceeds 10% of system memory. 2018-06-15 13:30:41.467440: W tensorflow/core/framework/allocator.cc:101] Allocation of 18003000 exceeds 10% of system memory. 2018-06-15 13:30:41.467780: W tensorflow/core/framework/allocator.cc:101] Allocation of 18003000 exceeds 10% of system memory. 2018-06-15 13:30:41.469035: W tensorflow/core/framework/allocator.cc:101] Allocation of 30725120 exceeds 10% of system memory. 2018-06-15 13:30:41.502380: W tensorflow/core/framework/allocator.cc:101] Allocation of 18003000 exceeds 10% of system memory. 2018-06-15 13:30:41.514799: W tensorflow/core/framework/allocator.cc:101] Allocation of 18003000 exceeds 10% of system memory. 2018-06-15 13:30:41.537815: W tensorflow/core/framework/allocator.cc:101] Allocation of 18003000 exceeds 10% of system memory. 2018-06-15 13:30:41.549917: W tensorflow/core/framework/allocator.cc:101] Allocation of 18003000 exceeds 10% of system memory. 2018-06-15 13:30:41.589259: W tensorflow/core/framework/allocator.cc:101] Allocation of 18003000 exceeds 10% of system memory. 2018-06-15 13:30:41.602441: W tensorflow/core/framework/allocator.cc:101] Allocation of 18003000 exceeds 10% of system memory. 2018-06-15 13:30:41.602441: W tensorflow/core/framework/allocator.cc:101] Allocation of 30725120 exceeds 10% of system memory.
I eventually had to kill the process
Looks like it is a warning thrown by tensorflow because of less memory https://github.com/tensorflow/tensorflow/issues/18736 . Are you traininig your model using a GPU?. Training might be extremely slow without a GPU.
I am using the CPU @divamgupta could you say the keras and tensorflow version you are using ?
keras 2.1.4 and tensorflow 1.4.0 .
@divamgupta ,yeah gpu is solving the issue and I am training my model.
Can you specify a bit more on the type of attention you are using ?
Also how are you predicting the outputs ? It will be great if you are using beam search thing