Training the model

class DualCrossEntropyLossFlat[source]

DualCrossEntropyLossFlat(*args, axis=-1, flatten=True, floatify=False, is_2d=True, activation=None, decodes=None, **kwargs) :: CrossEntropyLossFlat

Average of a tuple of cross-entropy losses. Not sure it's a good idea.

pitch_accuracy[source]

pitch_accuracy(inp, targ)

rhythm_accuracy[source]

rhythm_accuracy(inp, targ)

avg_accuracy[source]

avg_accuracy(inp, targ)

class ResetTrainer[source]

ResetTrainer() :: Callback

Reset the model when switching between training and validation.

get_learner[source]

get_learner(db:DataBunch, model:Module)

Constructs a learner from a databunch, using DualCrossEntroyLossFlat as a loss function.

train[source]

train(learn:Learner, epochs=10, max_lr=0.001)

Train the model for a number of epochs.