Registry

Yann provides an object registry that enables it to resolve instances from strings. You can register your own objects to make them discoverable by the system.

Resolving by name

1
2
3
4
import yann


resnet = yann.resolve.model('resnet18', pretrained=True)

Registering your own objects

1
2
3
4
5
import yann

@yann.register.loss
def custom_loss():
  pass