MCPcopy Create free account
hub / github.com/dangf15/THLNet / __setstate__

Method __setstate__

nets/dfnet_block.py:63–66  ·  view source on GitHub ↗
(self, state)

Source from the content-addressed store, hash-verified

61 self.bidirectional = bidirectional
62
63 def __setstate__(self, state):
64 if 'activation' not in state:
65 state['activation'] = F.relu
66 super(TransformerEncoderLayer, self).__setstate__(state)
67
68 def forward(self, src, src_mask=None, src_key_padding_mask=None):
69 # type: (Tensor, Optional[Tensor], Optional[Tensor]) -> Tensor

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected