In [1]:
%run loss_per_iter.py
In [5]:
H.repl
Out[5]:
In [2]:
%matplotlib inline
import matplotlib.pyplot as plt
In [3]:
labels = {"abs_adam": "Adam(abs)", "abs_sgd": "GD(abs)", "clip_adam": "Adam(PG)",
"clip_sgd": "GD(PG)", "update_rule": "Mult"}
In [4]:
def plot_costs(name):
plt.plot(range(len(costs[name])), costs[name], label=labels[name])
In [5]:
def plot_nmis(name):
plt.plot(range(len(nmis[name])), nmis[name], label=labels[name])
In [9]:
names = ["clip_sgd", "abs_sgd", "clip_adam", "abs_adam", "update_rule"]
In [7]:
names = ["abs_adam", "update_rule"]
In [10]:
for name in names:
plot_nmis(name)
#plt.ylim(0.0015, 0.034)
#plt.xlim(0, 50)
plt.legend()
Out[10]:
In [15]:
for name in models:
plot_costs(name)
#plt.ylim(0.0015, 0.0024)
#plt.xlim(0, 30)
plt.legend()
Out[15]:
In [12]:
for name in names:
plot_costs(name)
plt.ylim(0.0015, 0.0024)
plt.xlim(0, 30)
plt.legend()
Out[12]:
In [8]:
for name in names:
plot_costs(name)
#plt.ylim(0.0015, 0.0024)
#plt.xlim(0, 30)
plt.legend()
Out[8]:
In [11]:
In [ ]: