'Called when training is about to begin
Arguments:
callback_data (HDF5 dataset): shared data between callbacks
model (Model): model object
epochs (int): Total epochs'

def on_train_begin(self, callback_data, model, epochs):

    callback_data.create_dataset('cost/loss', ((epochs // self.epoch_freq),))
    callback_data.create_dataset('time/loss', ((epochs // self.epoch_freq),))
    callback_data['cost/loss'].attrs['time_markers'] = 'epoch_freq'
    callback_data['cost/loss'].attrs['epoch_freq'] = self.epoch_freq
