MCPcopy Create free account
hub / github.com/Meshcapade/difflocks / un_normalize_data

Function un_normalize_data

models/strand_codec.py:47–55  ·  view source on GitHub ↗
(strands_data, mean, std)

Source from the content-addressed store, hash-verified

45 return strands_data
46
47def un_normalize_data(strands_data, mean, std):
48 orig_shape = strands_data.shape
49 nr_strands = strands_data.shape[0]
50 nr_elements_spatial_dim = strands_data.shape[1]
51 strands_data=strands_data.view(nr_strands, nr_elements_spatial_dim, -1)
52 strands_data=strands_data*std.view(1,1,-1)
53 strands_data=strands_data+mean.view(1,1,-1)
54 strands_data=strands_data.view(orig_shape)
55 return strands_data
56
57def un_normalize_data_2D(strands_data, mean, std):
58 orig_shape = strands_data.shape

Callers 1

forwardMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected