Skip to content

Instantly share code, notes, and snippets.

View lucifermorningstar1305's full-sized avatar
👨‍💻
Always Coding

Adityam Ghosh lucifermorningstar1305

👨‍💻
Always Coding
View GitHub Profile
@ferrine
ferrine / network_builder.py
Last active November 10, 2023 04:43
Pytorch models from yaml files
import torch.nn
import collections
class Builder(object):
def __init__(self, *namespaces):
self._namespace = collections.ChainMap(*namespaces)
def __call__(self, name, *args, **kwargs):
try:
return self._namespace[name](*args, **kwargs)