Skip to content

Commit

Permalink
resolved #314
Browse files Browse the repository at this point in the history
also disable calculating scalar_labels, for more info #313
  • Loading branch information
hvgazula committed Apr 2, 2024
1 parent 66edbb2 commit 690b68c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions nobrainer/processing/segmentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ def __init__(
self.volume_shape_ = None
self.scalar_labels_ = None


def fit(
self,
dataset_train,
Expand All @@ -58,7 +57,7 @@ def fit(
batch_size = dataset_train.batch_size
self.block_shape_ = dataset_train.block_shape
self.volume_shape_ = dataset_train.volume_shape
self.scalar_labels_ = dataset_train.scalar_labels
# self.scalar_labels_ = dataset_train.scalar_labels
n_classes = dataset_train.n_classes
opt_args = opt_args or {}
if optimizer is None:
Expand Down Expand Up @@ -100,6 +99,9 @@ def _compile():
if callbacks is None:
callbacks = []

dataset_train.repeat(epochs)
dataset_validate.repeat(epochs)

if self.checkpoint_tracker:
callbacks.append(self.checkpoint_tracker)
self.model_.fit(
Expand Down

0 comments on commit 690b68c

Please sign in to comment.