Error: dot support for x of rank 4 is not yet implemented
See original GitHub issueTensorFlow.js version
0.12.5
Browser version
Node v8.9.1
Describe the problem or feature request
I am using Tensorflow.js to predict on a model I trained in Keras. However, when I feed in my 4-dimensional tensor I get the following error:
UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: dot support for x of rank 4 is not yet implemented: x shape = 32,1,1,100
I assume this means the functionality is not available yet to do tf.dot
with a 4d vector. However, I am calling tf.model.predict
so I guess tf.dot
is called internally? Does this mean it is impossible to run predictions on 4d vectors at this point? It just seems strange that I haven’t been able to find anything about this on the web or in the docs…
Code to reproduce the bug / link to feature request
If you want to reproduce the bug, here is a simple github project with my model and relevant code.
Otherwise, here is the relevant code:
noise_tensor.print(true)
generated_images = model.predict(noise_tensor) //error occours here
…and this is the print output of noise_tensor
:
Tensor
dtype: float32
rank: 4
shape: [64,1,1,100]
values:
[ [ [[0.3799773 , -0.0252707, 0.0118336 , ..., 0.1703698 , -0.0649208, 0.2152225 ],]],
[ [[0.219656 , 0.2850143 , -0.1078744, ..., 0.1627689 , -0.0838831, -0.1112608],]],
[ [[-0.1295149, -0.08308 , 0.1872116 , ..., -0.2033772, -0.4184959, -0.3357461],]],
...
[ [[0.0029674 , 0.0422036 , 0.067896 , ..., 0.1368463 , 0.1122015 , -0.0395375],]],
[ [[0.043546 , -0.0281712, 0.0898769 , ..., 0.205565 , 0.1444133 , 0.0067788 ],]],
[ [[-0.1089588, -0.0161969, -0.0724337, ..., 0.1427118 , -0.2577117, 0.0013836 ],]]]
In my repository, I put the python code I used to train (and predict) my model with Keras. I’m not sure if it’s relevant, but if you want to take a look, it’s here.
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (1 by maintainers)
Top GitHub Comments
This should be fixed at the next minor release.
I’m able to reproduce the problem, working on adding the missing nd mat feature