Source code for cosense3d.modules.utils

import copy
from torch import nn


[docs]def build_torch_module(cfg): cfg_ = copy.deepcopy(cfg) module_name = cfg_.pop('type') module = getattr(nn, module_name)(**cfg_) return module