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

Commit 3d86e3a

Browse files
committed
Fix cythonization error in sgd_fast.pyx
Class variables are already defined in the .pxd.
1 parent c4e33f6 commit 3d86e3a

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

lightning/impl/sgd_fast.pyx

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,6 @@ cdef class ModifiedHuber(LossFunction):
5656

5757
cdef class Hinge(LossFunction):
5858

59-
cdef double threshold
60-
6159
def __init__(self, double threshold=1.0):
6260
self.threshold = threshold
6361

@@ -76,8 +74,6 @@ cdef class Hinge(LossFunction):
7674

7775
cdef class SmoothHinge(LossFunction):
7876

79-
cdef double gamma
80-
8177
def __init__(self, double gamma=1.0):
8278
self.gamma = gamma # the larger, the smoother
8379

@@ -106,8 +102,6 @@ cdef class SmoothHinge(LossFunction):
106102

107103
cdef class SquaredHinge(LossFunction):
108104

109-
cdef double threshold
110-
111105
def __init__(self, double threshold=1.0):
112106
self.threshold = threshold
113107

@@ -156,8 +150,6 @@ cdef class SquaredLoss(LossFunction):
156150

157151
cdef class Huber(LossFunction):
158152

159-
cdef double c
160-
161153
def __init__(self, double c):
162154
self.c = c
163155

@@ -182,8 +174,6 @@ cdef class Huber(LossFunction):
182174

183175
cdef class EpsilonInsensitive(LossFunction):
184176

185-
cdef double epsilon
186-
187177
def __init__(self, double epsilon):
188178
self.epsilon = epsilon
189179

0 commit comments

Comments
 (0)