Expected int32, got list containing Tensors of type '_Message' instead. #18
Comments
I checked the code, the tensorflow docs and realized that everything_incorrect_first = tf.concat(0, [incorrectly_recognised_indices, correctly_recognised_indices]) Whereas it should be this, I suppose: everything_incorrect_first = tf.concat([incorrectly_recognised_indices, correctly_recognised_indices], 0) Although, I changed the code and got a new error: $ python mnist_1.0_softmax.py
Extracting data/train-images-idx3-ubyte.gz
Extracting data/train-labels-idx1-ubyte.gz
Extracting data/t10k-images-idx3-ubyte.gz
Extracting data/t10k-labels-idx1-ubyte.gz
Traceback (most recent call last):
File "mnist_1.0_softmax.py", line 78, in <module>
I = tensorflowvisu.tf_format_mnist_images(X, Y, Y_) # assembles 10x10 images by default
File "/home/gabriel/Work/tensorflow-mnist-tutorial/tensorflowvisu.py", line 55, in tf_format_mnist_images
superimposed_digits = tf.select(correct_prediction_s, tf.zeros_like(correct_tags),correct_tags+computed_tags) # only pring the correct and computed digits on unrecognised images
AttributeError: module 'tensorflow' has no attribute 'select' Am I using the incorrect version of tensorflow? |
you seem to have an old version of the code |
That was something odd, because I had forked the repo just 2 days ago. Anyway, I've updated the code and the script is working now. **However, the animation didn't show up. Any clue why I'm not seeing it? ** |
I downloaded the latest tensorflow today and cloned the repo and I had to convert the tf.concat() functions to the original param structure to get them to work: Maybe TensorFlow changed their concat function to be like it was before but I thought I would let you know. |
It should be fixed by this commit f8ed776. Please give a try :). |
Odd, you are not the first person reporting this although it works well for me. |
Yes, you're exactly right. I had a couple of issues. I was using a conda environment where tensorflow had previously been installed and wouldn't update. I created a fresh environment but ran into this issue described here where the tensorflow install wouldn't work in a new conda environment: ContinuumIO/anaconda-issues#542 Once that was working I ran into another issue due to using a Mac with matplotlib: http://stackoverflow.com/questions/21784641/installation-issue-with-matplotlib-python Once I got through these everything is working normally with the current code. Sorry for the confusion. Hopefully this can help others avoid confusion in the future. |
Thanks. |
The other person reporting a similar issue also confirmed he was testing with the wrong Python environment. Closing. |
Env:
Installation:
I have installed both matplotlib and tensorflow with pip.
I just cloned the repo, installed the packages and tried to run the very first file in the codelab instructions.
The text was updated successfully, but these errors were encountered: