| 45 | return strands_data |
| 46 | |
| 47 | def 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 | |
| 57 | def un_normalize_data_2D(strands_data, mean, std): |
| 58 | orig_shape = strands_data.shape |