ppplinday / tensorflow-vgg16-train-and-test Goto Github PK
View Code? Open in Web Editor NEWThe purpose of this program is for studying. Using tensorflow trains the vgg16 and recognizes only two kinds of picture(cat and dog).
The purpose of this program is for studying. Using tensorflow trains the vgg16 and recognizes only two kinds of picture(cat and dog).
Hello! I would like to ask if your training code can be used to train ILSVRC-2012 dataset? Thank you!
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!
CT image
Imagenet
vgg16
weights
svm
soft max
knn
First, thank you for sharing your codes.
And after i used your codes, i found that the accuracy is very low, what else can i do to improve it?
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 ?
I haven't find dropout function in your network。
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.
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.