warmup_plugin
- lib.infer.plugin_utils.warmup_plugin(plugin: ExtractPlugin, batch_size: int, channels_last: bool | None = None) bool | None
Warm up a plugin that contains torch modules. If channels_last is
Nonethen attempt to send a channels first batch through. If it fails, send a channels last batch through- Parameters:
plugin (ExtractPlugin) – The plugin to warmup
batch_size (int) – The batch size to put through the model
channels_last (bool | None) – The expected channel order of the plugin or
Noneto detect
- Returns:
Trueif the plugin is detected as channels last,Falsefor channels first,Nonefor could not be detected- Return type:
bool