diff --git a/monai/README.md b/monai/README.md index 556cdee535..a224996f38 100644 --- a/monai/README.md +++ b/monai/README.md @@ -14,13 +14,13 @@ * **inferers**: defines model inference methods. -* **losses**: classes defining loss functions. +* **losses**: classes defining loss functions, which follow the pattern of `torch.nn.modules.loss`. * **metrics**: defines metric tracking types. * **networks**: contains network definitions, component definitions, and Pytorch specific utilities. -* **optimizers**: classes defining optimizers. +* **optimizers**: classes defining optimizers, which follow the pattern of `torch.optim`. * **transforms**: defines data transforms for preprocessing and postprocessing. diff --git a/monai/engines/evaluator.py b/monai/engines/evaluator.py index 71b5069705..73c27d7570 100644 --- a/monai/engines/evaluator.py +++ b/monai/engines/evaluator.py @@ -130,7 +130,7 @@ class SupervisedEvaluator(Evaluator): Args: device: an object representing the device on which to run. val_data_loader: Ignite engine use data_loader to run, must be Iterable, typically be torch.DataLoader. - network: use the network to run model forward. + network: network to evaluate in the evaluator, should be regular PyTorch `torch.nn.Module`. epoch_length: number of iterations for one epoch, default to `len(val_data_loader)`. non_blocking: if True and this copy is between CPU and GPU, the copy may occur asynchronously with respect to the host. For other cases, this argument has no effect. @@ -245,7 +245,7 @@ class EnsembleEvaluator(Evaluator): device: an object representing the device on which to run. val_data_loader: Ignite engine use data_loader to run, must be Iterable, typically be torch.DataLoader. epoch_length: number of iterations for one epoch, default to `len(val_data_loader)`. - networks: use the networks to run model forward in order. + network: networks to evaluate in order in the evaluator, should be regular PyTorch `torch.nn.Module`. pred_keys: the keys to store every prediction data. the length must exactly match the number of networks. non_blocking: if True and this copy is between CPU and GPU, the copy may occur asynchronously diff --git a/monai/engines/trainer.py b/monai/engines/trainer.py index d017bce70d..899c6a63ae 100644 --- a/monai/engines/trainer.py +++ b/monai/engines/trainer.py @@ -60,9 +60,11 @@ class SupervisedTrainer(Trainer): device: an object representing the device on which to run. max_epochs: the total epoch number for trainer to run. train_data_loader: Ignite engine use data_loader to run, must be Iterable or torch.DataLoader. - network: to train with this network. - optimizer: the optimizer associated to the network. - loss_function: the loss function associated to the optimizer. + network: network to train in the trainer, should be regular PyTorch `torch.nn.Module`. + optimizer: the optimizer associated to the network, should be regular PyTorch optimizer from `torch.optim` + or its subclass. + loss_function: the loss function associated to the optimizer, should be regular PyTorch loss, + which inherit from `torch.nn.modules.loss`. epoch_length: number of iterations for one epoch, default to `len(train_data_loader)`. non_blocking: if True and this copy is between CPU and GPU, the copy may occur asynchronously with respect to the host. For other cases, this argument has no effect.