MCPcopy
hub / github.com/zai-org/CogVideo / append_dims

Function append_dims

sat/sgm/modules/autoencoding/magvit2_pytorch.py:76–77  ·  view source on GitHub ↗
(t, ndims: int)

Source from the content-addressed store, hash-verified

74
75
76def append_dims(t, ndims: int):
77 return t.reshape(*t.shape, *((1,) * ndims))
78
79
80def is_odd(n):

Callers 15

forwardMethod · 0.70
__call__Method · 0.50
__call__Method · 0.50
__call__Method · 0.50
dynamic_thresholding2Function · 0.50
dynamic_thresholding3Function · 0.50
to_dFunction · 0.50
sampler_stepMethod · 0.50
sampler_stepMethod · 0.50
ancestral_euler_stepMethod · 0.50
ancestral_stepMethod · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected