code: def __init__(
      self,
      num_features: Optional[int],
      feature_extractor: Optional[torch.nn.Module],
      output_transform: Callable = lambda x: x,
      device: Union[str, torch.device] = torch.device("cpu"),
  ) -> None:
      if num_features is None:
          raise ValueError(
              "Argument num_features must be provided, if feature_extractor is specified."
          )
  
      if feature_extractor is None:
          feature_extractor = torch.nn.Identity()
  
      if num_features <= 0:
          raise ValueError(
              f"Argument num_features must be greater to zero, got: {num_features}"
          )
  
      if not isinstance(feature_extractor, torch.nn.Module):
          raise TypeError(
              f"Argument feature_extractor must be of type torch.nn.Module, got {type(self._feature_extractor)}"
          )
  
      self._num_features = num_features
      self._feature_extractor = feature_extractor.to(device)
  
      super(_BaseInceptionMetric, self).__init__(
          output_transform=output_transform, device=device
      )
  
file_path: ignite/ignite/metrics/gan/utils.py
imports: from typing import Callable, Optional, Union
  import torch
  from packaging.version import Version
  from ignite.metrics.metric import Metric
label_desc: Use image node_id 1 to create a new _BaseInceptionMetric object from inherited base classes: Metric with example: obj = _BaseInceptionMetric(num_features, feature_extractor, output_transform, device)