Skip to content
This repository was archived by the owner on Dec 6, 2023. It is now read-only.

Commit 9f5b9b6

Browse files
committed
FIX: remove __init__ from .pxd file
1 parent 8f11fc7 commit 9f5b9b6

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

lightning/impl/sgd_fast.pxd

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,6 @@ cdef class Hinge(LossFunction):
1818

1919
cdef double threshold
2020

21-
def __init__(self, double threshold=1.0):
22-
self.threshold = threshold
23-
2421
cpdef double loss(self, double p, double y)
2522

2623
cpdef double get_update(self, double p, double y)
@@ -30,9 +27,6 @@ cdef class SmoothHinge(LossFunction):
3027

3128
cdef double gamma
3229

33-
def __init__(self, double gamma=1.0):
34-
self.gamma = gamma # the larger, the smoother
35-
3630
cpdef double loss(self, double p, double y)
3731

3832
cpdef double get_update(self, double p, double y)
@@ -42,9 +36,6 @@ cdef class SquaredHinge(LossFunction):
4236

4337
cdef double threshold
4438

45-
def __init__(self, double threshold=1.0):
46-
self.threshold = threshold
47-
4839
cpdef double loss(self, double p, double y)
4940

5041
cpdef double get_update(self, double p, double y)
@@ -68,9 +59,6 @@ cdef class Huber(LossFunction):
6859

6960
cdef double c
7061

71-
def __init__(self, double c):
72-
self.c = c
73-
7462
cpdef double loss(self, double p, double y)
7563

7664
cpdef double get_update(self, double p, double y)
@@ -80,9 +68,6 @@ cdef class EpsilonInsensitive(LossFunction):
8068

8169
cdef double epsilon
8270

83-
def __init__(self, double epsilon):
84-
self.epsilon = epsilon
85-
8671
cpdef double loss(self, double p, double y)
8772

8873
cpdef double get_update(self, double p, double y)

0 commit comments

Comments
 (0)