MCPcopy Create free account
hub / github.com/MiniMax-AI/VTP / __init__

Method __init__

vtp/models/layers/misc.py:35–43  ·  view source on GitHub ↗
(
            self,
            prob: float = 0.5,
            exclude_first_token: bool = True
    )

Source from the content-addressed store, hash-verified

33 """
34
35 def __init__(
36 self,
37 prob: float = 0.5,
38 exclude_first_token: bool = True
39 ):
40 super().__init__()
41 assert 0 <= prob < 1.
42 self.prob = prob
43 self.exclude_first_token = exclude_first_token # exclude CLS token
44
45 def forward(self, x):
46 if not self.training or self.prob == 0.:

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected