MCPcopy Create free account
hub / github.com/THUDM/GLM / __init__

Method __init__

fp16/fp16.py:68–70  ·  view source on GitHub ↗
(self, module)

Source from the content-addressed store, hash-verified

66
67class FP16_Module(nn.Module):
68 def __init__(self, module):
69 super(FP16_Module, self).__init__()
70 self.add_module('module', module.half())
71
72 def forward(self, *inputs, **kwargs):
73 return fp16_to_fp32(self.module(*(fp32_to_fp16(inputs)), **kwargs))

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected