analogvnn.utils.get_model_summaries
#
Module Contents#
Functions#
|
Creates the model summaries. |
- analogvnn.utils.get_model_summaries.get_model_summaries(model: Optional[torch.nn.Module], input_size: Optional[Sequence[int]] = None, train_loader: torch.utils.data.DataLoader = None, *args, **kwargs) Tuple[str, str] [source]#
Creates the model summaries.
- Parameters:
train_loader (DataLoader) – the train loader.
model (nn.Module) – the model to log.
input_size (Optional[Sequence[int]]) – the input size.
*args – the arguments to torchinfo.summary.
**kwargs – the keyword arguments to torchinfo.summary.
- Returns:
the model __repr__ and the model summary.
- Return type:
- Raises:
ImportError – if torchinfo (https://github.com/tyleryep/torchinfo) is not installed.
ValueError – if the input_size and train_loader are None.