AurocMetricPyTorch¶
-
class
AurocMetricPyTorch
[source]¶ Metric to Calculate AuROC
Deprecated since version 0.1:
AurocMetricPyTorch
will be removed in next release and is deprecated in favor oftrixi.logging
ModulesWarning
AurocMetricPyTorch
will be removed in next release-
forward
(outputs: torch.Tensor, targets: torch.Tensor)[source]¶ Actual AuROC calculation
- Parameters
outputs (torch.Tensor) – predictions from network
targets (torch.Tensor) – training targets
- Returns
auroc value
- Return type
-
AccurarcyMetricPyTorch¶
-
class
AccuracyMetricPyTorch
[source]¶ Metric to Calculate Accuracy
Deprecated since version 0.1:
AccuracyMetricPyTorch
will be removed in next release and is deprecated in favor oftrixi.logging
ModulesWarning
class:AccuracyMetricPyTorch will be removed in next release
-
forward
(outputs: torch.Tensor, targets: torch.Tensor)[source]¶ Actual accuracy calcuation
- Parameters
outputs (torch.Tensor) – predictions from network
targets (torch.Tensor) – training targets
- Returns
accuracy value
- Return type
-
pytorch_batch_to_numpy¶
-
pytorch_batch_to_numpy
(tensor: torch.Tensor)[source]¶ Utility Function to cast a whole PyTorch batch to numpy
- Parameters
tensor (torch.Tensor) – the batch to convert
- Returns
the converted batch
- Return type
np.ndarray
pytorch_tensor_to_numpy¶
-
pytorch_tensor_to_numpy
(tensor: torch.Tensor)[source]¶ Utility Function to cast a single PyTorch Tensor to numpy
- Parameters
tensor (torch.Tensor) – the tensor to convert
- Returns
the converted tensor
- Return type
np.ndarray
float_to_pytorch_tensor¶
create_optims_default_pytorch¶
-
create_optims_default_pytorch
(model, optim_cls, **optim_params)[source]¶ Function to create a optimizer dictionary (in this case only one optimizer for the whole network)
- Parameters
model (
AbstractPyTorchNetwork
) – model whose parameters should be updated by the optimizeroptim_cls – Class implementing an optimization algorithm
**optim_params – Additional keyword arguments (passed to the optimizer class
- Returns
dictionary containing all created optimizers
- Return type
create_optims_gan_default_pytorch¶
-
create_optims_gan_default_pytorch
(model, optim_cls, **optim_params)[source]¶ Function to create a optimizer dictionary (in this case two optimizers: One for the generator, one for the discriminator)
- Parameters
model (
AbstractPyTorchNetwork
) – model whose parameters should be updated by the optimizeroptim_cls – Class implementing an optimization algorithm
optim_params – Additional keyword arguments (passed to the optimizer class
- Returns
dictionary containing all created optimizers
- Return type
create_optims_default_tf¶
-
create_optims_default_tf
(optim_cls, **optim_params)[source]¶ Function to create a optimizer dictionary (in this case only one optimizer)
- Parameters
optim_cls – Class implementing an optimization algorithm
**optim_params – Additional keyword arguments (passed to the optimizer class)
- Returns
dictionary containing all created optimizers
- Return type