Comments (3)
I store the statistic to .pkl
file,
you can use pickle
and matplotlib
to plot the graph
for example:
import pickle
import matplotlib.pyplot as plt
with open('training_statistic.pkl', 'rb') as data:
training = pickle.load(data)
...
from deepcoral.
Thank you so much. Can you provide full script please?
from deepcoral.
As you wish, but my script are not pretty at all...
import pickle
import matplotlib.pyplot as plt
training = []
testing_s = []
testing_t = []
testing_so = []
testing_to = []
with open('w-coral-256/training_statistic.pkl', 'rb') as data:
training = pickle.load(data)
with open('w-coral-256/testing_s_statistic.pkl', 'rb') as data:
testing_s = pickle.load(data)
with open('w-coral-256/testing_t_statistic.pkl', 'rb') as data:
testing_t = pickle.load(data)
with open('wo-coral-256/testing_s_statistic.pkl', 'rb') as data:
testing_so = pickle.load(data)
with open('wo-coral-256/testing_t_statistic.pkl', 'rb') as data:
testing_to = pickle.load(data)
summary = {}
summary['training_acc'] = [ep['accuracy'] for ep in testing_s]
summary['testing_acc'] = [ep['accuracy'] for ep in testing_t]
summary['training_acco'] = [ep['accuracy'] for ep in testing_so]
summary['testing_acco'] = [ep['accuracy'] for ep in testing_to]
plt.figure(figsize=(8,5))
plt.plot(summary['testing_acc'], 'b', marker='*', fillstyle='none', label='testing acc. w/ coral loss')
plt.plot(summary['testing_acco'], 'g', marker='o', fillstyle='none', label='testing acc. w/o coral loss')
plt.plot(summary['training_acc'], 'r', marker='|', fillstyle='none', label='training acc. w/ coral loss')
plt.plot(summary['training_acco'], 'pink', marker='s', fillstyle='none', label='training acc. w/o coral loss')
plt.xlabel('Epoch')
plt.ylabel('Accuracy')
plt.title('Testing Accuracy (Batch = [200, 56])')
plt.legend()
plt.savefig('accuracy.png')
# plt.show()
print(len(training[0]))
loss = {}
loss['coral_loss'] = [x['coral_loss'] for ep in training for x in ep]
loss['classification_loss'] = [x['classification_loss'] for ep in training for x in ep]
plt.figure(figsize=(6.84,5.44))
plt.plot(loss['coral_loss'], 'b', label='CORAL loss')
plt.plot(loss['classification_loss'], 'r', label='classification loss')
plt.title('Loss')
plt.legend()
plt.xlabel('iterations')
plt.ylabel('loss')
plt.savefig('loss.png')
# plt.show()
from deepcoral.
Related Issues (19)
- Error !!! HOT 1
- A line in main.py(). HOT 1
- code about testing HOT 6
- Any update results like Deep CORAL paper ?
- self.target_fc never used HOT 1
- Why it's loss = loss/(4*d*4) ? HOT 1
- The point of self.target_fc? HOT 1
- Error in calculation of covariance matrix HOT 1
- CORAL loss is defined differently from the original paper HOT 9
- TypeError: unsupported operand type(s) for /: 'tuple' and 'int'
- I think you have a error. HOT 2
- Test accuracy is low than original test accuracy in the paper. HOT 20
- The CORAL Loss and Forbenius Norm is defined differently and the results dont match.
- Inputs to the CORAL loss HOT 3
- Correlation Loss HOT 13
- The reason for setting _lambda ascending ? HOT 1
- Pretrained model HOT 10
- Low Accuracy for SHVN ---> MNIST HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from deepcoral.