def _setDerivatives(self, d, owner=None): """ put slices of this array back into the modules """ ParameterContainer._setDerivatives(self, d, owner) index = 0 for x in self._containerIterator(): x._setDerivatives(self.derivs[index:index + x.paramdim], self) index += x.paramdim
def _setDerivatives(self, d, owner=None): ParameterContainer._setDerivatives(self, d, owner) size = self.dim self.ingatePeepDerivs = self.derivs[:size] self.forgetgatePeepDerivs = \ self.derivs[size:size * (1 + self.dimensions)] self.outgatePeepDerivs = \ self.derivs[size * (1 + self.dimensions):]
def _setDerivatives(self, d, owner = None): ParameterContainer._setDerivatives(self, d, owner) dim = self.outdim self.ingatePeepDerivs = self.derivs[:dim] self.forgetgatePeepDerivs = self.derivs[dim:dim*2] self.outgatePeepDerivs = self.derivs[dim*2:]