Commit b3a42e70 authored by Andrei-Claudiu Roibu's avatar Andrei-Claudiu Roibu 🖥
Browse files

updated labels calls in constructor and dice score plotter

parent f2f233ad
...@@ -74,7 +74,7 @@ class LogWriter(): ...@@ -74,7 +74,7 @@ class LogWriter():
if labels is not None: if labels is not None:
self.labels = self.labels_generator(labels) self.labels = self.labels_generator(labels)
else: else:
pass self.labels = ['rsfMRI']
self.logger = logging.getLogger() self.logger = logging.getLogger()
file_handler = logging.FileHandler( file_handler = logging.FileHandler(
...@@ -194,8 +194,12 @@ class LogWriter(): ...@@ -194,8 +194,12 @@ class LogWriter():
ax.xaxis.set_label_position('top') ax.xaxis.set_label_position('top')
ax.bar(np.arange(self.number_of_classes), dice_score) ax.bar(np.arange(self.number_of_classes), dice_score)
ax.set_xticks(np.arange(self.number_of_classes)) ax.set_xticks(np.arange(self.number_of_classes))
ax.set_xticklabels(self.labels)
ax.xaxis.tick_bottom() if self.labels is None:
pass
else:
ax.set_xticklabels(self.labels)
ax.xaxis.tick_bottom()
if epochs: if epochs:
self.log_writer[phase].add_figure( self.log_writer[phase].add_figure(
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment