MCPcopy Create free account
hub / github.com/modelscope/modelscope / unsqueeze

Method unsqueeze

modelscope/models/science/unifold/modules/frame.py:354–363  ·  view source on GitHub ↗
(
        self,
        dim: int,
    )

Source from the content-addressed store, hash-verified

352 return Frame(rot_obj, torch.stack(origin, dim=-1))
353
354 def unsqueeze(
355 self,
356 dim: int,
357 ) -> Frame:
358 if dim >= len(self.shape):
359 raise ValueError('Invalid dimension')
360 rots = self._r.unsqueeze(dim)
361 trans = self._t.unsqueeze(dim if dim >= 0 else dim - 1)
362
363 return Frame(rots, trans)
364
365 @staticmethod
366 def cat(

Callers 15

nan_to_numFunction · 0.45
forwardMethod · 0.45
_upfirdn2d_refFunction · 0.45
forwardMethod · 0.45
forwardMethod · 0.45
process_fine_levelMethod · 0.45
forwardMethod · 0.45
forwardMethod · 0.45
stream_greedy_searchMethod · 0.45
stream_sampleMethod · 0.45
recover_from_ricFunction · 0.45
parse_wavFunction · 0.45

Calls 1

FrameClass · 0.85

Tested by 1

preprocessMethod · 0.36