in orbit/pyro/ktr.py [0:0]
def __init__(self, data):
for key, value in data.items():
key = key.lower()
if isinstance(value, (list, np.ndarray)):
# TODO: this is hackk way; please fix this later
if key in ["which_valid_res"]:
# to use as index, tensor type has to be long or int
value = torch.tensor(value)
elif key in ["coef_prior_list"]:
pass
else:
# loc/scale cannot be in long format
# sometimes they may be supplied as int, so dtype conversion is needed
value = torch.tensor(value, dtype=torch.double)
self.__dict__[key] = value