Source code for pytomography

import torch
[docs]device = torch.device("cpu")
[docs]dtype = torch.float32
[docs]delta = 1e-11
[docs]def set_dtype(dt): global dtype global delta dtype = dt torch.set_default_dtype(dt) if dt==torch.float16: delta = 1e-5 elif dt==torch.float32: delta = 1e-11
[docs]def set_device(d): global device device = d