MCPcopy Create free account
hub / github.com/deepspeedai/DeepSpeed / extra_repr

Method extra_repr

deepspeed/module_inject/layers.py:638–645  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

636 return new_obj
637
638 def extra_repr(self):
639 out_features, in_features = None, None
640 if self.weight is not None:
641 out_features, in_features = self.weight.ds_shape[-2:] if is_zero_param(
642 self.weight) else self.weight.shape[-2:]
643 dtype = self.weight.dtype if self.weight is not None else None
644 return "in_features={}, out_features={}, bias={}, dtype={}".format(in_features, out_features, self.bias
645 is not None, dtype)
646
647 def move(self, tensor):
648 # TODO: consider the timing of deletion

Callers

nothing calls this directly

Calls 1

is_zero_paramFunction · 0.90

Tested by

no test coverage detected