Callback for RNN training

Open In Colab

Callback that uses the outputs of language models to add AR and TAR regularization

  1. /usr/local/lib/python3.8/dist-packages/torch/cuda/__init__.py:52: UserWarning: CUDA initialization: Found no NVIDIA driver on your system. Please check that you have an NVIDIA GPU and installed a driver from http://www.nvidia.com/Download/index.aspx (Triggered internally at /pytorch/c10/cuda/CUDAFunctions.cpp:100.)
  2. return torch._C._cuda_getDeviceCount() > 0

class ModelResetter[source]

ModelResetter(after_create=None, before_fit=None, before_epoch=None, before_train=None, before_batch=None, after_pred=None, after_loss=None, before_backward=None, before_step=None, after_cancel_step=None, after_step=None, after_cancel_batch=None, after_batch=None, after_cancel_train=None, after_train=None, before_validate=None, after_cancel_validate=None, after_validate=None, after_cancel_epoch=None, after_epoch=None, after_cancel_fit=None, after_fit=None) :: Callback

Callback that resets the model at each validation/training step

class RNNCallback[source]

RNNCallback(after_create=None, before_fit=None, before_epoch=None, before_train=None, before_batch=None, after_pred=None, after_loss=None, before_backward=None, before_step=None, after_cancel_step=None, after_step=None, after_cancel_batch=None, after_batch=None, after_cancel_train=None, after_train=None, before_validate=None, after_cancel_validate=None, after_validate=None, after_cancel_epoch=None, after_epoch=None, after_cancel_fit=None, after_fit=None) :: Callback

Save the raw and dropped-out outputs and only keep the true output for loss computation

class RNNRegularizer[source]

RNNRegularizer(alpha=0.0, beta=0.0) :: Callback

Add AR and TAR regularization

rnn_cbs[source]

rnn_cbs(alpha=0.0, beta=0.0)

All callbacks needed for (optionally regularized) RNN training


Company logo

©2021 fast.ai. All rights reserved.
Site last generated: Mar 31, 2021