Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def _default_callbacks(self):
return [
('epoch_timer', EpochTimer()),
('train_loss', BatchScoring(
train_loss_score,
name='train_loss',
on_train=True,
target_extractor=noop,
)),
('valid_loss', BatchScoring(
valid_loss_score,
name='valid_loss',
target_extractor=noop,
)),
('valid_acc', EpochScoring(
'accuracy',
name='valid_acc',
lower_is_better=False,
)),
('print_log', PrintLog()),
]
def _default_callbacks(self):
return [
('epoch_timer', EpochTimer()),
('train_loss', BatchScoring(
train_loss_score,
name='train_loss',
on_train=True,
target_extractor=noop,
)),
('valid_loss', BatchScoring(
valid_loss_score,
name='valid_loss',
target_extractor=noop,
)),
('print_log', PrintLog()),
]
def _default_callbacks(self):
return [
('epoch_timer', EpochTimer()),
('train_loss', BatchScoring(
train_loss_score,
name='train_loss',
on_train=True,
target_extractor=noop,
)),
('valid_loss', BatchScoring(
valid_loss_score,
name='valid_loss',
target_extractor=noop,
)),
('print_log', PrintLog()),
]
def _default_callbacks(self):
return [
('epoch_timer', EpochTimer()),
('train_loss', BatchScoring(
train_loss_score,
name='train_loss',
on_train=True,
target_extractor=noop,
)),
('valid_loss', BatchScoring(
valid_loss_score,
name='valid_loss',
target_extractor=noop,
)),
('print_log', PrintLog()),
]
def _default_callbacks(self):
return [
('epoch_timer', EpochTimer()),
('train_loss', BatchScoring(
train_loss_score,
name='train_loss',
on_train=True,
target_extractor=noop,
)),
('valid_loss', BatchScoring(
valid_loss_score,
name='valid_loss',
target_extractor=noop,
)),
('print_log', PrintLog()),
]
def _default_callbacks(self):
return [
('epoch_timer', EpochTimer()),
('train_loss', BatchScoring(
train_loss_score,
name='train_loss',
on_train=True,
target_extractor=noop,
)),
('valid_loss', BatchScoring(
valid_loss_score,
name='valid_loss',
target_extractor=noop,
)),
('valid_acc', EpochScoring(
'accuracy',
name='valid_acc',
lower_is_better=False,
)),
('print_log', PrintLog()),