Git Product home page Git Product logo

Comments (9)

martin-gorner avatar martin-gorner commented on August 30, 2024 2

you seem to have an old version of the code
I have pushed TF 1.0 changes recently
try to refresh (i.e. git pull)

from tensorflow-mnist-tutorial.

gabrielaraujof avatar gabrielaraujof commented on August 30, 2024

I checked the code, the tensorflow docs and realized that tf.concat has now a different order in the argument list. The code was this:

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?
If yes, what version should I be using for now?

from tensorflow-mnist-tutorial.

gabrielaraujof avatar gabrielaraujof commented on August 30, 2024

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? **

from tensorflow-mnist-tutorial.

tcrack326 avatar tcrack326 commented on August 30, 2024

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:
everything_incorrect_first = tf.concat(0, [incorrectly_recognised_indices, correctly_recognised_indices])

Maybe TensorFlow changed their concat function to be like it was before but I thought I would let you know.

from tensorflow-mnist-tutorial.

kkdai avatar kkdai commented on August 30, 2024

It should be fixed by this commit f8ed776.

Please give a try :).

from tensorflow-mnist-tutorial.

martin-gorner avatar martin-gorner commented on August 30, 2024

Odd, you are not the first person reporting this although it works well for me.
Are you installing Tensorflow using "pip3 install --upgrade tensorflow" ?
Or maybe you are specifying a versioned package explicitly ?

from tensorflow-mnist-tutorial.

tcrack326 avatar tcrack326 commented on August 30, 2024

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.
Love the course!

from tensorflow-mnist-tutorial.

martin-gorner avatar martin-gorner commented on August 30, 2024

Thanks.
I'll leave this issue open for a couple of days to capture similar experiences.

from tensorflow-mnist-tutorial.

martin-gorner avatar martin-gorner commented on August 30, 2024

The other person reporting a similar issue also confirmed he was testing with the wrong Python environment. Closing.

from tensorflow-mnist-tutorial.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.