| 1 | import torch as th |
| 2 | |
| 3 | class EasyDict: |
| 4 | |
| 5 | def __init__(self, sub_dict): |
| 6 | for k, v in sub_dict.items(): |
| 7 | setattr(self, k, v) |
| 8 | |
| 9 | def __getitem__(self, key): |
| 10 | return getattr(self, key) |
| 11 | |
| 12 | def mean_flat(x): |
| 13 | """ |
nothing calls this directly
no outgoing calls
no test coverage detected