MCPcopy Create free account
hub / github.com/UX-Decoder/Semantic-SAM / _LinearWithBias

Class _LinearWithBias

semantic_sam/modules/attention.py:324–328  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

322# This class exists solely for Transformer; it has an annotation stating
323# that bias is never None, which appeases TorchScript
324class _LinearWithBias(nn.Linear):
325 bias: Tensor # type: ignore
326
327 def __init__(self, in_features: int, out_features: int) -> None:
328 super().__init__(in_features, out_features, bias=True) # type: ignore
329
330
331class MultiheadAttention(nn.Module):

Callers 1

__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected