class_docstr: Visual representations using a torchvision model.
  
  ---
  name: Visual
code: def _plain_forward(
      self, indices: Optional[torch.LongTensor] = None
  ) -> torch.FloatTensor:  # noqa: D102
      dataset = self.images
      if indices is not None:
          dataset = torch.utils.data.Subset(
              dataset=dataset, indices=indices
          )
      data_loader = torch.utils.data.DataLoader(
          dataset, batch_size=self.batch_size
      )
      with torch.inference_mode(mode=not self.trainable):
          return torch.cat(
              [
                  self._encode(
                      images=images,
                      encoder=self.encoder,
                      pool=self.pool,
                  )
                  for images in data_loader
              ],
              dim=-1,
          )
  
imports: import functools
  import pathlib
  from typing import Any, Callable, Optional, Sequence, Union
  import torch
  import torch.nn
  import torch.utils.data
  from class_resolver import OptionalKwargs
  from docdata import parse_docdata
  from .representation import BackfillRepresentation, Representation
  from .utils import ShapeError, WikidataCache
  from ..datasets import Dataset
  from ..triples import TriplesFactory
  from ..typing import OneOrSequence
label_desc: Use image node_id 3 for calling the VisualRepresentation obj's underlying member method code with example usage: obj._plain_forward(indices) and returns: torch