MCPcopy Create free account
hub / github.com/MotrixLab/AiOS / __call__

Method __call__

models/aios/utils.py:109–117  ·  view source on GitHub ↗
(self, refanchors: Tensor)

Source from the content-addressed store, hash-verified

107 [x_noise_scale, y_noise_scale, w_noise_scale, h_noise_scale])
108
109 def __call__(self, refanchors: Tensor) -> Tensor:
110 nq, bs, query_dim = refanchors.shape
111 device = refanchors.device
112
113 noise_raw = torch.rand_like(refanchors)
114 noise_scale = self.noise_scale.to(device)[:query_dim]
115
116 new_refanchors = refanchors * (1 + (noise_raw - 0.5) * noise_scale)
117 return new_refanchors.clamp_(0, 1)
118
119
120def sigmoid_focal_loss(inputs,

Callers

nothing calls this directly

Calls 1

toMethod · 0.45

Tested by

no test coverage detected