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

Method encode

SwissArmyTransformer/sat/model/official/mae_model.py:150–151  ·  view source on GitHub ↗
(self, input_ids, position_ids, attention_mask=None, **kw_args)

Source from the content-addressed store, hash-verified

148 super().__init__(args, encoder=encoder, decoder=decoder, tie_word_embeddings=False)
149
150 def encode(self, input_ids, position_ids, attention_mask=None, **kw_args):
151 return self.encoder(input_ids, position_ids, attention_mask, **kw_args)
152
153 def decode(self, input_ids, position_ids, attention_mask, encoder_outputs, ids_restore, **kw_args):
154 return self.decoder(input_ids, position_ids, attention_mask, encoder_outputs=encoder_outputs, ids_restore=ids_restore, **kw_args)

Callers 8

forwardMethod · 0.95
process_fnFunction · 0.45
forwardMethod · 0.45
__init__Method · 0.45
__getitem__Method · 0.45

Calls

no outgoing calls

Tested by 1

process_fnFunction · 0.36