def set_params(self, pdict):
        assert type(pdict) is dict
        for key in pdict['params']:
            if not hasattr(self, key):
                setattr(self, key, None)

            attr = getattr(self, key)
            if isinstance(attr, Tensor):
                # this attr has already been allocated
                # get set the values
                attr.set(pdict['params'][key])
            elif type(pdict['params'][key]) is np.ndarray:
                setattr(self, key, self.be.array(pdict['params'][key], **self.get_param_attrs()))
            else:
                setattr(self, key, pdict['params'][key])

        if self.dW is None:
            self.dW = self.be.empty_like(self.W)
Set layer parameters (weights). Allocate space for other parameters but do not initialize
dataset/ETHPy150Open NervanaSystems/neon/neon/layers/layer.py/ParameterLayer.set_params