Draw Net, learning curve and intermediate images of CNN training

General discussion about topics related to OpenMV.
User avatar
chrisPyres66
Posts: 108
Joined: Mon Jul 16, 2018 9:22 am
Location: France

Draw Net, learning curve and intermediate images of CNN training

Postby chrisPyres66 » Fri Jan 25, 2019 5:48 am

Dear all,

I try and understand how CNN training works by having the net image, learning curve and intermediate images of CNN training.

For draw the net i use
~/caffe/python/draw_net.py ~/openmv/ml/cmsisnn/models/lettre_O_V3/fnt-lettre_O_V3_train_test.prototxt ~/openmv/ml/cmsisnn/models/fnt-lettre_O_V3-net.png

For learning curve i used the plot_learning_curve.py (need python-pandas) from : http://adilmoujahid.com/posts/2016/06/i ... hon-caffe/
with :
// Train before because weights file should exist
~/caffe/build/tools/caffe train --solver=models/lettre_O_V3/fnt-lettre_O_V3_solver.prototxt
// Create log file
~/caffe/build/tools/caffe train --solver=models/lettre_O_V3/fnt-lettre_O_V3_solver.prototxt --weights models/lettre_O_V3/fnt-lettre_O_V3_iter_10000.caffemodel 2>&1 | tee models/lettre_O_V3/fnt-lettre_O_V3_train.log
// Plot the curve
python2 ./tools/plot_learning_curve.py /home/christophe/openmv/ml/cmsisnn/models/lettre_O_V3/fnt-lettre_O_V3_train.log /home/christophe/openmv/ml/cmsisnn/models/fnt-lettre_O_V3_learning_curve.png

For intermediate image, i dont have any to clue to do it.
Any help would be great ?

Thanks,
Attachments
plot_learning_curve.py
(2.34 KiB) Downloaded 118 times
User avatar
kwagyeman
Posts: 3205
Joined: Sun May 24, 2015 2:10 pm

Re: Draw Net, learning curve and intermediate images of CNN training

Postby kwagyeman » Fri Jan 25, 2019 11:47 am

Um, I always just looked at the text output. Ibrahim was doing some stuff with plotting...
Nyamekye,
User avatar
kwagyeman
Posts: 3205
Joined: Sun May 24, 2015 2:10 pm

Re: Draw Net, learning curve and intermediate images of CNN training

Postby kwagyeman » Fri Jan 25, 2019 11:48 am

So, this isn't really the caffe / python forums. There are other places to ask for answers on this.
Nyamekye,
User avatar
chrisPyres66
Posts: 108
Joined: Mon Jul 16, 2018 9:22 am
Location: France

Re: Draw Net, learning curve and intermediate images of CNN training

Postby chrisPyres66 » Mon Jan 28, 2019 2:42 am

yes you are right i jump to caffe forum
thanks,
User avatar
chrisPyres66
Posts: 108
Joined: Mon Jul 16, 2018 9:22 am
Location: France

Re: Draw Net, learning curve and intermediate images of CNN training

Postby chrisPyres66 » Mon Jan 28, 2019 10:56 am

To complete this post, i just discoverted than caffe have curve plotting python program.
Here is the way i use it :

1- Create log file
cd ~/openmv/ml/cmsisnn/
./models/lettre_O_V3/fnt-train.sh >> ./models/lettre_O_V3/fnt-lettre_O_V3-output.log 2>&1

2- Draw plot
Supported chart types:
0: Test_accuracy_vs_Iters
1: Test_accuracy_vs_Seconds
2: Test_loss_vs_Iters
3: Test_loss_vs_Seconds
4: Train_learning_rate_vs_Iters
5: Train_learning_rate_vs_Seconds
6: Train_loss_vs_Iters
7: Train_loss_vs_Seconds

for example :
python2 ~/caffe/tools/extra/plot_training_log.py 0 ./models/lettre_O_V3/image/fnt-lettre_O_V3-Test_accuracy_vs_Iters.png ./models/lettre_O_V3/fnt-lettre_O_V3-output.log

Thanks,

Return to “General Topics”

Who is online

Users browsing this forum: No registered users and 33 guests