MCPcopy Create free account
hub / github.com/TencentARC/AnimeGamer / get_input

Method get_input

VDM_Decoder/vae_modules/autoencoder.py:192–196  ·  view source on GitHub ↗
(self, batch: Dict)

Source from the content-addressed store, hash-verified

190 self.additional_decode_keys = set(default(additional_decode_keys, []))
191
192 def get_input(self, batch: Dict) -> torch.Tensor:
193 # assuming unified data format, dataloader returns a dict.
194 # image tensors should be scaled to -1 ... 1 and in channels-first
195 # format (e.g., bchw instead if bhwc)
196 return batch[self.input_key]
197
198 def get_autoencoder_params(self) -> list:
199 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