Skip to content

Instantly share code, notes, and snippets.

Last active July 5, 2020 11:11
What would you like to do?
from smdebug.trials import create_trial
from smdebug import modes
import numpy as np
import matplotlib.pyplot as plt
# Get the tensors from S3
s3_output_path = estimator.latest_job_debugger_artifacts_path()
# Create a Trial
trial = create_trial(s3_output_path)
# Get all the tensor names
# Get the values of the tensor `val_acc`for mode GLOBAL (validation accuracy)
values = trial.tensor("val_acc").values(modes.GLOBAL)
# Convert it to numpy array
values_eval = np.array(list(values.items()))
fig = plt.figure()
plt.plot(values_eval[:, 1])
fig.suptitle('Validation Accuracy', fontsize=20)
plt.xlabel('Intervals of sampling', fontsize=18)
plt.ylabel('Acuracy', fontsize=16)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment