MCPcopy Create free account
hub / github.com/NVIDIA/FasterTransformer / forward

Method forward

examples/pytorch/bert/utils/encoder.py:343–346  ·  view source on GitHub ↗
(self, hidden_states, attention_mask)

Source from the content-addressed store, hash-verified

341 self.head_mask = [None] * layer_num
342
343 def forward(self, hidden_states, attention_mask):
344 extended_attention_mask = (1.0 - attention_mask) * -10000.0
345 output = self.encoder(hidden_states, extended_attention_mask, self.head_mask)
346 return output

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected