Skip to content

Commit

Permalink
Averager object is also configurable through config.py
Browse files Browse the repository at this point in the history
  • Loading branch information
vanangamudi committed Aug 8, 2018
1 parent 267a7ed commit 5cd37e1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion utilz.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ def init_hidden(batch_size, cell):
class Averager(list):
def __init__(self, config, filename=None, ylim=None, *args, **kwargs):
super(Averager, self).__init__(*args, **kwargs)
self.config = config
self.filename = filename
self.ylim = ylim
if filename:
Expand Down Expand Up @@ -218,7 +219,7 @@ def empty(self):
def write_to_file(self):

if self.filename:
if self.config.plot_metrics:
if self.config.CONFIG.plot_metrics:
import matplotlib.pyplot as plt
plt.plot(self)
plt.title(os.path.basename(self.filename), fontsize=20)
Expand Down

0 comments on commit 5cd37e1

Please sign in to comment.