random_input_from_plugin

lib.infer.plugin_utils.random_input_from_plugin(plugin: ExtractPlugin, batch_size: int, channels_last: bool) np.ndarray

Obtain a random input array from a plugin’s information for the given batch size

Parameters:
  • plugin (ExtractPlugin) – The plugin to obtain the input array for

  • batch_size (int) – The batch size for the input array

  • channels_last (bool) – True if the data should be formatted channels last

Return type:

A random input array in the correct format for the given plugin at the given batch size