Closed aryopg closed 7 years ago
Hi @aryopg, vgg19_trainable
is a trainable pre-trained network and there is no code for training attached to this project. The main objective of this project is to provide pre-trained VGG for usage like transfer training or acting as cost function in image synthesis.
You can find more discussion abut how to train the network in here and here.
If you are new to Tensoflow, it is good to start with the official tutorial to understand the concept about how the computations of Tensors are submitted to the native environment and return back to python.
I'm so sorry for my non-expert question, but i have these questions in my mind:
Please don't get me wrong. You are welcome to ask questions :)
Yes, you can train the last fc layer (or all the fc layers) in order retain it to do different things. In this case, you can still keep using the ability of the conv
layers to analysis the features of the image. And then formulate different outcomes based on your new training.
To see the accuracy of an iteration, you can define a cost function in your training. I have an example in this project here. If you execute the cost with a session and then print it out, it could be an index of the "accuracy" of your training.
I currently training 25.000-ish data with 8 as batch_size and now i'm entering 800th training step. Is it normal for the accuracy to stay in 0.0305344. I'm afraid that i wait for something that won't improve
Oh i also want to ask, how to execute the cost with a session? is it like this: sess.run(cost, feed_dict={images: train_image_batch.eval(), true_out: train_label_batch.eval(), train_mode: True})
I currently training 25.000-ish data with 8 as batch_size and now i'm entering 800th training step. Is it normal for the accuracy to stay in 0.0305344. I'm afraid that i wait for something that won't improve
What is your cost function?
Oh i also want to ask, how to execute the cost with a session? is it like this: sess.run(cost, feed_dict={images: train_image_batch.eval(), true_out: train_label_batch.eval(), train_mode: True})
Yes. You can print the cost like this:
cost_out = sess.run( cost, feed_dict=...)
print( cost_out )
i use the same cost function with your code : cost = tf.reduce_sum((vgg.prob - true_out) ** 2)
Which optimizer are you using? Do you mind to show me the whole code that you used to train the network?
i use gradient descent with 0.0001 learning rate. May i know your personal email to send the code?
Hi chris, i've changed the optimizer into adam and it's working really well. Thanks for the support. Will contact you again if i have another problem :)
No problem
btw i want to send the code to you to be checked. May i get your email?
I actually got a weird stuff going on, i was trying to modify the optimizer learning rate and i got 8.0 accuracy 1 is the highest. Can you check my code?
@aryopg Sorry for invoking the post again but can you share your code for training. I am trying to train the network but getting loss 2.0 consistently. Thank you and really appreciate your response.
I'm actually new to tensorflow, i don't know how to show the accuracy and error from the vgg19_trainable code each training. Thanks in advance