Profiler module
- calculate_features_networks.estimate_memory_inference(model, sample_input, batch_size=1, use_amp=False, device=0)[source]
Predict the maximum memory usage of the model. :param optimizer_type: the class name of the optimizer to instantiate :type optimizer_type: Type :param model: the neural network model :type model: nn.Module :param sample_input: A sample input to the network. It should be
a single item, not a batch, and it will be replicated batch_size times.
- Parameters:
batch_size (int) – the batch size
use_amp (bool) – whether to estimate based on using mixed precision
device (torch.device) – the device to use
- calculate_features_networks.get_parser(model)[source]
Function to get the parser with the arguments.
- Raises:
ValueError – The specified configuration doesn’t exist
- Returns:
Arguments from the command line.
- Return type:
argparse.Namespace