1

I'm trying to train a simple model with embeddings on Sagemaker, using Mxnet backhand and aiming to run across multiple GPUs.

The line below is causing an error:

   preprod = keras.layers.Dot(axes=1, normalize=False)([bet_vec, user_vec])

Whenever I use keras.layers.Dot I get the following error msg:

File "/usr/local/lib/python3.5/dist-packages/keras/backend/mxnet_backend.py", line 2292, in squeeze assert shape.pop(axis) == 1, 'Can only squeeze size 1 dimension' IndexError: pop from empty list

The code runs fine locally but it does not work using Mxnet/GPUs...

If anyone could help it would be much appreciated.

Thank you :-)

tezzaaa
  • 459
  • 1
  • 6
  • 17
  • Can you confirm the shapes of `bet_vec` and `user_vec`? It looks like `squeeze` is being called on an array with no shape! – Thom Lane Oct 31 '19 at 23:27
  • Could it be that `Dot` need two arguments, and you're passing one? So the second argument would be the empty one. – Thom Lane Oct 31 '19 at 23:28

0 Answers0