2

I have multiple output binary files on different files and I want to visualize it on 1 plot. in each file, the file had different rows now I need to visualize it in 1 plot. here's my code:

# Visualize training history
import keras
import numpy as np
from matplotlib import pyplot as plt
import pandas as pd

for fname in ('/models/unet_mobilenet_jt_0.0001_25_256_yes/unet_mobilenet_jt_0.0001_25_256_yes_history.bin','/models/unet_mobilenet_jt_0.001_50_256_yes/unet_mobilenet_jt_0.001_50_256_yes_history.bin', '/models/unet_mobilenet_jt_0.0001_100_256_yes/unet_mobilenet_jt_0.0001_100_256_yes_history.bin'):
    data=pd.read_pickle(fname)

# Plot training & validat accuray values
plt.plot(data['precision'])
plt.plot(data['val_precision'])
plt.title('Hasil semua epoch precision')
plt.ylabel('precision')
plt.xlabel('epoch')
plt.legend(['train 25', 'validation 25','train 50', 'validation 50', 'train 100', 'validation 100'], loc='lower right')
plt.show()

I just can visualize it from train 25 and the rest of the file didn't show up, I've tried from here here and it didn't work out

1
  • it's clear, i forgot bout some indent from plt.plo until plt.xlabel had same indent with data=pd.read_pickle(fname) Commented Dec 19, 2020 at 0:38

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.