class_docstr: A MobileNet v2 encoder for RLlib.
code: def __init__(self, config):
      super().__init__(config)
      self.net = torch.hub.load(
          "pytorch/vision:v0.6.0", "mobilenet_v2", pretrained=True
      )
      if config.freeze:
          # We don't want to train this encoder, so freeze its parameters!
          for p in self.net.parameters():
              p.requires_grad = False
  
file_path: ray/rllib/examples/models/mobilenet_v2_encoder.py
imports: from ray.rllib.core.models.base import Encoder, ENCODER_OUT
  from ray.rllib.core.models.configs import ModelConfig
  from ray.rllib.core.models.torch.base import TorchModel
  from ray.rllib.utils.framework import try_import_torch
label_desc: Use image node_id 1 to create a new MobileNetV2Encoder object from inherited base classes: TorchModel, Encoder with example: obj = MobileNetV2Encoder(config)