SpatialStereoscope.train(max_epochs=400, lr=0.01, use_gpu=None, batch_size=128, plan_kwargs=None, **kwargs)[source]

Trains the model using MAP inference.

max_epochs : intint (default: 400)

Number of epochs to train for

lr : floatfloat (default: 0.01)

Learning rate for optimization.

use_gpu : str | int | bool | NoneUnion[str, int, bool, None] (default: None)

Use default GPU if available (if None or True), or index of GPU to use (if int), or name of GPU (if str, e.g., ‘cuda:0’), or use CPU (if False).

batch_size : intint (default: 128)

Minibatch size to use during training.

plan_kwargs : dict | NoneOptional[dict] (default: None)

Keyword args for TrainingPlan. Keyword arguments passed to train() will overwrite values present in plan_kwargs, when appropriate.


Other keyword args for Trainer.