MCPcopy Create free account
hub / github.com/InternRobotics/G2VLM / _make_divisible

Method _make_divisible

data/transforms.py:68–70  ·  view source on GitHub ↗

Ensure the value is divisible by the stride.

(self, value, stride)

Source from the content-addressed store, hash-verified

66 self.antialias = antialias
67
68 def _make_divisible(self, value, stride):
69 """Ensure the value is divisible by the stride."""
70 return max(stride, int(round(value / stride) * stride))
71
72 def _apply_scale(self, width, height, scale):
73 new_width = round(width * scale)

Callers 1

_apply_scaleMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected