

@classmethod
def gen_class(cls, pdict):
    layers = []
    for layer in pdict['layers']:
        typ = layer['type']
        ccls = load_class(typ)
        layers.append(ccls.gen_class(layer['config']))
    lsave = pdict.pop('layers')
    new_cls = cls(layers=layers, **pdict)
    pdict['layers'] = lsave
    return new_cls

dataset/ETHPy150Open NervanaSystems/neon/neon/layers/container.py LayerContainer.gen_class/original