Giter Site home page Giter Site logo

ppplinday / tensorflow-vgg16-train-and-test Goto Github PK

View Code? Open in Web Editor NEW
172.0 172.0 112.0 1.54 MB

The purpose of this program is for studying. Using tensorflow trains the vgg16 and recognizes only two kinds of picture(cat and dog).

Python 100.00%
deep-learning nerual-network tensorflow vgg16

tensorflow-vgg16-train-and-test's People

Contributors

ppplinday avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tensorflow-vgg16-train-and-test's Issues

about train

when i run the train.py, there are sth wrong with the codes,
image

training

Hello! I would like to ask if your training code can be used to train ILSVRC-2012 dataset? Thank you!

about test

when I run test_vgg.py, I did not get the predict result, but some platform information such as "linux --python 3.6.8 ..."also it did not give a wrong or warning. I want to know why it happened, t hanks!

Something wrong after running test_vgg.py

Hi ,when i run test_vgg.py,Something wrong happend,
File "test_vgg.py", line 11, in recognize
output_graph_def.ParseFromString(f.read())
google.protobuf.message.DecodeError: Error parsing message

How to solve this problem ?

question about 'softmax' in train_vgg.py

Hello there!

Your code is pretty clear and helpful to others, thank you for your effort!

Here, I raised a question about 'softmax', u write about this:

train_vgg.py:

#fc8
    with tf.name_scope('fc8') as scope:
        kernel = weight_variable([4096, 2])
        biases = bias_variable([2])
        output_fc8 = tf.nn.relu(fc(output_fc7, kernel, biases), name=scope)

    finaloutput = tf.nn.softmax(output_fc8, name="softmax")

    cost = tf.reduce_mean(tf.nn.softmax_cross_entropy_with_logits(logits=finaloutput, labels=y))

Here, u used tf.nn.softmax_cross_entropy_with_logits() function, which I thought is inner implemented softmax to normalize data and then calcuate cross entropy, applied on finaloutput which has already been applied by 'softmax'. So is there more reasonable to use:

cost = tf.reduce_mean(tf.nn.softmax_cross_entropy_with_logits(logits=output_fc8, labels=y))

?

That's to say, use output_fc8 result to calculate cross entropy.

IndexError: tuple index out of range

Hello, I test with your code for 10 categories images classification, but I get an error, do you know how to fix it?

I think in order to train a model for more than 2 categories, I need to modifiy some variables or parameters. Could you give me some hints? Thanks a lot.

Traceback (most recent call last):

  File "<ipython-input-6-96478bbedd1c>", line 271, in <module>
    main()

  File "<ipython-input-6-96478bbedd1c>", line 268, in main
    train_network(g, batch_size, num_epochs, pb_file_path)

  File "<ipython-input-6-96478bbedd1c>", line 254, in train_network
    total_cost_in_train_set))

IndexError: tuple index out of range

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.