bs_find: Bs_find

Description Usage Arguments Details

View source: R/bs_finder.R

Description

Launch a mock training to find a good batch size to minimize training time.

Usage

1
2
3
4
5
6
7
8
bs_find(
  object,
  lr,
  num_it = NULL,
  n_batch = 5,
  simulate_multi_gpus = TRUE,
  show_plot = TRUE
)

Arguments

object

model/learner

lr

learning rate

num_it

number of iterations

n_batch

number of batches

simulate_multi_gpus

simulate on multi gpus or not

show_plot

show plot or not

Details

However, it may not be a good batch size to minimize the validation loss. A good batch size is where the Simple Noise Scale converge ignoring the small growing trend with the number of iterations if exists. The optimal batch size is about an order the magnitud where Simple Noise scale converge. Typically, the optimal batch size in image classification problems will be 2-3 times lower where


fastai documentation built on Oct. 25, 2021, 5:08 p.m.