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

Method size_divisibility

semantic_sam/backbone/backbone.py:32–40  ·  view source on GitHub ↗

Some backbones require the input height and width to be divisible by a specific integer. This is typically true for encoder / decoder type networks with lateral connection (e.g., FPN) for which feature maps need to match dimension in the "bottom up" and "top down" pa

(self)

Source from the content-addressed store, hash-verified

30
31 @property
32 def size_divisibility(self) -> int:
33 """
34 Some backbones require the input height and width to be divisible by a
35 specific integer. This is typically true for encoder / decoder type networks
36 with lateral connection (e.g., FPN) for which feature maps need to match
37 dimension in the "bottom up" and "top down" paths. Set to 0 if no specific
38 input size divisibility is required.
39 """
40 return 0
41
42 def output_shape(self):
43 """

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected