MCPcopy Create free account
hub / github.com/CompVis/zigma / EasyDict

Class EasyDict

transport/utils.py:3–10  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1import torch as th
2
3class 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
12def mean_flat(x):
13 """

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected