def beta(self): self._ensure_is_connected() if self._beta is None: raise base.Error( "Batch normalization doesn't have an offset, so no beta") else: return self._beta
def gamma(self): self._ensure_is_connected() if self._gamma is None: raise base.Error( "Batch normalization doesn't have a scale, so no gamma") else: return self._gamma
def __eq__(self, other): if self.isAnonymous(): return False elif isinstance(other, User): if other.isAnonymous(): return False else: return self.id == other.id elif isinstance(other, int): return self.id == other elif isinstance(other, basestring): return self.name == other else: raise base.Error("invalid comparison")