MCPcopy Create free account
hub / github.com/OpenDriveLab/ReSim / get_input

Method get_input

sat/sgm/models/autoencoder.py:176–180  ·  view source on GitHub ↗
(self, batch: Dict)

Source from the content-addressed store, hash-verified

174 self.additional_decode_keys = set(default(additional_decode_keys, []))
175
176 def get_input(self, batch: Dict) -> torch.Tensor:
177 # assuming unified data format, dataloader returns a dict.
178 # image tensors should be scaled to -1 ... 1 and in channels-first
179 # format (e.g., bchw instead if bhwc)
180 return batch[self.input_key]
181
182 def get_autoencoder_params(self) -> list:
183 params = []

Callers 3

inner_training_stepMethod · 0.95
_validation_stepMethod · 0.95
log_imagesMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected