bootstrap.Model¶
-
class
bootstrap.models.model.
Model
(engine=None, cuda_tf=<class 'bootstrap.datasets.transforms.ToCuda'>, detach_tf=<class 'bootstrap.datasets.transforms.ToDetach'>, network=None, criterions={}, metrics={})[source]¶ Model contains a network, two criterions (train, eval) and two metrics.
-
cuda
(device_id=None)[source]¶ Moves all model parameters and buffers to the GPU.
Parameters: device_id (int, optional) – if specified, all parameters will be copied to that device
-
forward
(batch)[source]¶ Prepare the batch and feed it to the network, criterion and metric.
Returns: a dictionary of outputs Return type: out (dict)
-
-
class
bootstrap.models.model.
DefaultModel
(engine=None, cuda_tf=<class 'bootstrap.datasets.transforms.ToCuda'>, detach_tf=<class 'bootstrap.datasets.transforms.ToDetach'>)[source]¶ An extension of Model that relies on factory calls