MCPcopy Index your code
hub / github.com/NVIDIA/FastPhotoStyle / weight_assign

Function weight_assign

converter.py:11–14  ·  view source on GitHub ↗
(lua, pth, maps)

Source from the content-addressed store, hash-verified

9
10
11def weight_assign(lua, pth, maps):
12 for k, v in maps.items():
13 getattr(pth, k).weight = nn.Parameter(lua.get(v).weight.float())
14 getattr(pth, k).bias = nn.Parameter(lua.get(v).bias.float())
15
16
17def photo_wct_loader(p_wct):

Callers 1

converter.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected