MCPcopy
hub / github.com/TencentARC/Pixal3D / convert_module_to_f16

Function convert_module_to_f16

pixal3d/modules/utils.py:19–25  ·  view source on GitHub ↗

Convert primitive modules to float16.

(l)

Source from the content-addressed store, hash-verified

17
18
19def convert_module_to_f16(l):
20 """
21 Convert primitive modules to float16.
22 """
23 if isinstance(l, MIX_PRECISION_MODULES):
24 for p in l.parameters():
25 p.data = p.data.half()
26
27
28def convert_module_to_f32(l):

Callers

nothing calls this directly

Calls 1

halfMethod · 0.45

Tested by

no test coverage detected