Code Monkey home page Code Monkey logo

Comments (2)

bearpaw avatar bearpaw commented on May 18, 2024 1

Sorry that I did not integrate Tensorboard in this code. However, I write a very simple logger to save the training progress. After training, you should find the log.txt in the directory when you save your model (e.g., checkpoints/cifar10/alexnet/log.txt). The log file should look like this

Learning Rate	Train Loss	Valid Loss	Train Acc.	Valid Acc.	
0.100000	1.451691	1.147165	47.110000	59.760000	
0.100000	0.914918	0.928320	67.084000	68.180000	
0.100000	0.719559	0.758013	74.574000	74.240000	
0.100000	0.604210	0.751205	79.030000	75.660000	
0.100000	0.538204	0.562017	81.564000	80.490000	
0.100000	0.493776	0.669323	82.940000	77.790000	
0.100000	0.465779	0.521751	83.890000	82.960000	
0.100000	0.437683	0.601297	84.980000	79.930000	

Then you can use the following script to visualize and compare the training process of the different models. For example, comparing the Valid Acc. for densenet-100 and densenet-190,

from utils import *
import matplotlib.pyplot as plt

paths = {
'densenet100':'/home/wyang/code/pytorch-classification/checkpoints/cifar10/densenet-bc-100-12/log.txt', 
'densenet190':'/home/wyang/code/pytorch-classification/checkpoints/cifar10/densenet-bc-L190-k40/log.txt', 
}

field = ['Valid Acc.']

monitor = LoggerMonitor(paths)
monitor.plot(names=field)

savefig('test.eps')
plt.show()

image

If you are willing to integrate Tensorboard into this code, feel free to create a PR. Thank you.

from pytorch-classification.

amiltonwong avatar amiltonwong commented on May 18, 2024

Thanks @bearpaw
FYI, tensorboard_logger

from pytorch-classification.

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.