Closed lampts closed 7 years ago
Got non-zero output with TF1.0.1 compliant version #4
Surprisingly, I have the same TF version.
In [1]: import tensorflow as tf
In [2]: tf.version Out[2]: '1.0.1'
I'm on 1.0.0 - still had to pick up the change for TF1.0.1 in order to run but the output is indeed all 0s. @lampts did you figure out what is going?
From my experiments the loop in transform,
for step in range(0, ceil_round_step(maxlen, nsteps), nsteps):
Isn't doing anything because maxlen is always 4.
In the end I gave up on Python 2.7 and TF 1.0.1 (or 1.0.0). If you use Python 3.4 (my version is 3.4.3) and TF 0.12.1 (I suspect 0.1X would work) it works out of the box and returns non-zero values.
I modified some lines of codes and can run it. However the output vector is all zeros.
v1 = model.transform(["hello"]) In [12]: np.allclose(v1[0],np.zeros(4096)) Out[12]: True
It seems that model cannot load the pretrained weights in the proper way.