{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# TrainingPhase and General scheduler" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Creates a scheduler that lets you train a model with following different [`TrainingPhase`](/callbacks.general_sched.html#TrainingPhase)." ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "hide_input": true }, "outputs": [], "source": [ "from fastai.gen_doc.nbdoc import *\n", "from fastai.callbacks.general_sched import * \n", "from fastai import *\n", "from fastai.vision import *" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "hide_input": true }, "outputs": [ { "data": { "text/markdown": [ "
class
TrainingPhase
[source]TrainingPhase
(`length`:`int`, `lrs`:`Floats`, `moms`:`Floats`, `lr_anneal`:`AnnealFunc`=`None`, `mom_anneal`:`AnnealFunc`=`None`)"
],
"text/plain": [
"class
GeneralScheduler
[source]GeneralScheduler
(`learn`:[`Learner`](/basic_train.html#Learner), `phases`:`Collection`\\[[`TrainingPhase`](/callbacks.general_sched.html#TrainingPhase)\\]) :: [`Callback`](/callback.html#Callback)\n",
"\n",
"Schedule multiple [`TrainingPhase`](/callbacks.general_sched.html#TrainingPhase) for a [`Learner`](/basic_train.html#Learner). "
],
"text/plain": [
"on_batch_end
[source]on_batch_end
(`train`, `kwargs`:`Any`)"
],
"text/plain": [
"on_train_begin
[source]on_train_begin
(`n_epochs`:`int`, `kwargs`:`Any`)"
],
"text/plain": [
"