Brainiac11 / My-Projects

Consider decorating method with @staticmethod PYL-R0201
Performance
Major
a year agoa year old
Method doesn't use the class instance and could be converted into a static method
27  def softmax(self, x):
28    return np.exp(x) / np.sum(np.exp(x), axis=0)
29
30  def leaky_relu(self, x):31    return np.where(x > 0, x, x * 0.01)
Method doesn't use the class instance and could be converted into a static method
24  def relu(self, x):
25    return x * (x >= 0)
26
27  def softmax(self, x):28    return np.exp(x) / np.sum(np.exp(x), axis=0)
29
30  def leaky_relu(self, x):
Method doesn't use the class instance and could be converted into a static method
21    net = self.softmax(net)
22    return net
23
24  def relu(self, x):25    return x * (x >= 0)
26
27  def softmax(self, x):