MCPcopy Create free account
hub / github.com/ModelTC/LightX2V / restore_tensor

Method restore_tensor

lightx2v/utils/quant_utils.py:84–89  ·  view source on GitHub ↗
(self, tensor, shape)

Source from the content-addressed store, hash-verified

82 return t
83
84 def restore_tensor(self, tensor, shape):
85 if tensor.shape == shape:
86 t = tensor
87 else:
88 t = tensor.reshape(shape)
89 return t
90
91 def get_tensor_qparams(self, tensor):
92 tensor = self.reshape_tensor(tensor)

Callers 2

fake_quant_tensorMethod · 0.95
real_quant_tensorMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected