melisgl / mgl Goto Github PK
View Code? Open in Web Editor NEWCommon Lisp machine learning library.
License: MIT License
Common Lisp machine learning library.
License: MIT License
Building with SBCL 2.2.1 / ASDF 3.3.5 for quicklisp dist creation.
Trying to build commit id c6735bb
mgl-example fails to build because of a failure in mgl.
mgl fails to build with the following error:
; caught ERROR:
; READ error during COMPILE-FILE: Package SWANK-MOP does not exist. Line: 250, Column: 42, File-Position: 8788 Stream: #<SB-INT:FORM-TRACKING-STREAM for "file /home/quicklisp/quicklisp-controller/dist/build-cache/mgl/7b9c7192c333a4d30078f577b80ba5e69497c904/mgl-20220215-git/src/util.lisp" {10118A2E23}>
...
Unhandled UIOP/LISP-BUILD:COMPILE-FILE-ERROR in thread #<SB-THREAD:THREAD "main thread" RUNNING {1001B98003}>: COMPILE-FILE-ERROR while compiling #<CL-SOURCE-FILE "mgl" "src" "util">
mgl/test fails to build because of a failure in mgl.
I'm seeing assorted errors when running (ASDF:OOS 'ASDF:TEST-OP :MGL)
on SBCL 2.1.2 on Linux on a machine w/o CUDA (Thinkpad.)
Captured a few samples below. I'm not sure if these errors are local to the actual problem or if they are indirectly caused by earlier heap corruption.
Anyone have a suggestion how to troubleshoot this?
Unhandled memory fault at #x330179C9608.
[Condition of type SB-SYS:MEMORY-FAULT-ERROR]
Restarts:
0: [RETRY] Retry #<TEST-OP > on #<SYSTEM "mgl/test">.
1: [ACCEPT] Continue, treating #<TEST-OP > on #<SYSTEM "mgl/test"> as having been successful.
2: [RETRY] Retry ASDF operation.
3: [CLEAR-CONFIGURATION-AND-RETRY] Retry ASDF operation after resetting the configuration.
4: [RETRY] Retry ASDF operation.
5: [CLEAR-CONFIGURATION-AND-RETRY] Retry ASDF operation after resetting the configuration.
--more--
Backtrace:
0: (SB-SYS:MEMORY-FAULT-ERROR #<unused argument> #.(SB-SYS:INT-SAP #X330179C9608))
1: ("foreign function: call_into_lisp")
2: ("foreign function: funcall2")
3: ("foreign function: handle_memory_fault_emulation_trap")
4: ("foreign function: #x417459")
5: ((LAMBDA (MGL-CUBE:FACET) :IN MGL-CUBE:CALL-WITH-FACET*) #(15.549831909387535d0 233.24747864081303d0 77.74915954693768d0 295.44680627836317d0 8.0d0 186.59798291265042d0 ...))
Locals:
MGL-CUBE:FACET = #(15.549831909387535d0 233.24747864081303d0 77.74915954693768d0 295.44680627836317d0 8.0d0 186.59798291265042d0 ...)
MGL-CUBE:FACET-NAME = MGL-MAT:FOREIGN-ARRAY
MGL-MAT::FN = #<FUNCTION (LAMBDA (#:C24) :IN MGL-MAT::BLAS-DGEMM) {10179CB71B}>
MGL-MAT:MAT = #<MGL-MAT:MAT 7x5 ABF #2A((15.549831909387535d0 233.24747864081303d0 77.74915954693768d0 295.44680627836317d0 8.0d0) ..)>
6: ((:METHOD MGL-CUBE:CALL-WITH-FACET* (MGL-CUBE:CUBE T T T)) #<MGL-MAT::VEC 35 L {10179CA383}> MGL-MAT::LISP-VECTOR :IO #<FUNCTION (LAMBDA (MGL-CUBE:FACET) :IN MGL-CUBE:CALL-WITH-FACET*) {10179CBB2B}>) ..
7: ((LAMBDA (MGL-CUBE:FACET) :IN MGL-CUBE:CALL-WITH-FACET*) #<unused argument>)
8: ((:METHOD MGL-CUBE:CALL-WITH-FACET* (MGL-CUBE:CUBE T T T)) #<MGL-MAT:MAT 7x5 ABF #2A((15.549831909387535d0 233.24747864081303d0 77.74915954693768d0 295.44680627836317d0 8.0d0) (186.59798291265042d0 10..
9: ((FLET CALL-NEXT-METHOD :IN "/home/luke/git/mgl-mat/src/mat.lisp") #<MGL-MAT:MAT 7x5 ABF #2A((15.549831909387535d0 233.24747864081303d0 77.74915954693768d0 295.44680627836317d0 8.0d0) (186.59798291265..
10: ((:METHOD MGL-CUBE:CALL-WITH-FACET* (MGL-MAT:MAT (EQL (QUOTE MGL-MAT:FOREIGN-ARRAY)) T T)) #<MGL-MAT:MAT 7x5 ABF #2A((15.549831909387535d0 233.24747864081303d0 77.74915954693768d0 295.44680627836317d0..
11: ((SB-PCL::SDFUN-METHOD MGL-CUBE:CALL-WITH-FACET*) #<unused argument> #<unused argument> #<MGL-MAT:MAT 7x5 ABF #2A((15.549831909387535d0 233.24747864081303d0 77.74915954693768d0 295.44680627836317d0 8...
12: ((LAMBDA (#:B21) :IN MGL-MAT::BLAS-DGEMM) #<MGL-MAT:FOREIGN-ARRAY {10179CB673}>)
13: ((LAMBDA (MGL-CUBE:FACET) :IN MGL-CUBE:CALL-WITH-FACET*) #(62.0d0 90.0d0 49.0d0 22.0d0 58.0d0 14.0d0 ...))
14: ((:METHOD MGL-CUBE:CALL-WITH-FACET* (MGL-CUBE:CUBE T T T)) #<MGL-MAT::VEC 28 L {10179C9173}> MGL-MAT::LISP-VECTOR :INPUT #<FUNCTION (LAMBDA (MGL-CUBE:FACET) :IN MGL-CUBE:CALL-WITH-FACET*) {10179CB60B}..
15: ((LAMBDA (MGL-CUBE:FACET) :IN MGL-CUBE:CALL-WITH-FACET*) #<unused argument>)
16: ((:METHOD MGL-CUBE:CALL-WITH-FACET* (MGL-CUBE:CUBE T T T)) #<MGL-MAT:MAT 4x7 ABF #2A((62.0d0 90.0d0 49.0d0 22.0d0 58.0d0 14.0d0 ...) (91.0d0 61.0d0 4.0d0 37.0d0 4.0d0 62.0d0 ...) (93.0d0 75.0d0 44.0d0..
17: ((FLET CALL-NEXT-METHOD :IN "/home/luke/git/mgl-mat/src/mat.lisp") #<MGL-MAT:MAT 4x7 ABF #2A((62.0d0 90.0d0 49.0d0 22.0d0 58.0d0 14.0d0 ...) (91.0d0 61.0d0 4.0d0 37.0d0 4.0d0 62.0d0 ...) (93.0d0 75.0d..
18: ((:METHOD MGL-CUBE:CALL-WITH-FACET* (MGL-MAT:MAT (EQL (QUOTE MGL-MAT:FOREIGN-ARRAY)) T T)) #<MGL-MAT:MAT 4x7 ABF #2A((62.0d0 90.0d0 49.0d0 22.0d0 58.0d0 14.0d0 ...) (91.0d0 61.0d0 4.0d0 37.0d0 4.0d0 6..
19: ((SB-PCL::SDFUN-METHOD MGL-CUBE:CALL-WITH-FACET*) #<unused argument> #<unused argument> #<MGL-MAT:MAT 4x7 ABF #2A((62.0d0 90.0d0 49.0d0 22.0d0 58.0d0 14.0d0 ...) (91.0d0 61.0d0 4.0d0 37.0d0 4.0d0 62.0..
--more--
The assertion
(MGL-MAT::~= #1=(MGL-MAT:COERCE-TO-CTYPE 3)
#2=(MGL-MAT:ASUM MGL-MAT::X))
failed with #1# = 3.0, #2# = 1.0.
[Condition of type SIMPLE-ERROR]
Restarts:
0: [CONTINUE] Retry assertion.
1: [RETRY] Retry #<TEST-OP > on #<SYSTEM "mgl/test">.
2: [ACCEPT] Continue, treating #<TEST-OP > on #<SYSTEM "mgl/test"> as having been successful.
3: [RETRY] Retry ASDF operation.
4: [CLEAR-CONFIGURATION-AND-RETRY] Retry ASDF operation after resetting the configuration.
5: [RETRY] Retry ASDF operation.
--more--
Backtrace:
0: (SB-KERNEL:ASSERT-ERROR (MGL-MAT::~= (MGL-MAT:COERCE-TO-CTYPE 3) (MGL-MAT:ASUM MGL-MAT::X)) 2 (MGL-MAT:COERCE-TO-CTYPE 3) 3.0 (MGL-MAT:ASUM MGL-MAT::X) 1.0)
1: ((LAMBDA NIL :IN MGL-MAT::TEST-ASUM))
2: (MGL-MAT:CALL-WITH-CUDA #<FUNCTION (LAMBDA NIL :IN MGL-MAT::TEST-ASUM) {53A27D6B}> :ENABLED NIL :DEVICE-ID 0 :RANDOM-SEED 1234 :N-RANDOM-STATES 4096 :OVERRIDE-ARCH-P T :N-POOL-BYTES NIL)
3: (MGL-MAT::TEST-ASUM)
4: (MGL-MAT::TEST)
5: (MGL-TEST:TEST)
6: (UIOP/PACKAGE:SYMBOL-CALL #:MGL-TEST #:TEST)
7: ((:METHOD ASDF/ACTION:PERFORM (ASDF/LISP-ACTION:TEST-OP (EQL #<ASDF/SYSTEM:SYSTEM "mgl/test">))) #<unused argument> #<unused argument>) [fast-method]
8: ((SB-PCL::EMF ASDF/ACTION:PERFORM) #<unused argument> #<unused argument> #<ASDF/LISP-ACTION:TEST-OP > #<ASDF/SYSTEM:SYSTEM "mgl/test">)
9: ((LAMBDA NIL :IN ASDF/ACTION:CALL-WHILE-VISITING-ACTION))
10: ((SB-PCL::SDFUN-METHOD ASDF/ACTION:PERFORM) #<unused argument> #<unused argument> #<ASDF/LISP-ACTION:TEST-OP > #<ASDF/SYSTEM:SYSTEM "mgl/test">)
11: ((:METHOD ASDF/ACTION:PERFORM-WITH-RESTARTS :AROUND (T T)) #<ASDF/LISP-ACTION:TEST-OP > #<ASDF/SYSTEM:SYSTEM "mgl/test">) [fast-method]
12: ((:METHOD ASDF/PLAN:PERFORM-PLAN (T)) #<ASDF/PLAN:SEQUENTIAL-PLAN {101658D813}>) [fast-method]
13: ((FLET SB-C::WITH-IT :IN SB-C::%WITH-COMPILATION-UNIT))
14: ((:METHOD ASDF/PLAN:PERFORM-PLAN :AROUND (T)) #<ASDF/PLAN:SEQUENTIAL-PLAN {101658D813}>) [fast-method]
15: ((LAMBDA (SB-PCL::.ARG0. SB-INT:&MORE SB-PCL::.MORE-CONTEXT. SB-PCL::.MORE-COUNT.) :IN "/home/luke/quicklisp/setup.lisp") #<ASDF/PLAN:SEQUENTIAL-PLAN {101658D813}>)
16: ((:METHOD ASDF/OPERATE:OPERATE (ASDF/OPERATION:OPERATION ASDF/COMPONENT:COMPONENT)) #<ASDF/LISP-ACTION:TEST-OP > #<ASDF/SYSTEM:SYSTEM "mgl"> :PLAN-CLASS NIL :PLAN-OPTIONS NIL) [fast-method]
17: ((SB-PCL::EMF ASDF/OPERATE:OPERATE) #<unused argument> #<unused argument> #<ASDF/LISP-ACTION:TEST-OP > #<ASDF/SYSTEM:SYSTEM "mgl">)
18: ((LAMBDA NIL :IN ASDF/OPERATE:OPERATE))
19: ((:METHOD ASDF/OPERATE:OPERATE :AROUND (T T)) #<ASDF/LISP-ACTION:TEST-OP > #<ASDF/SYSTEM:SYSTEM "mgl">) [fast-method]
--more--
The assertion
(CL-NUM-UTILS.NUM=:NUM=
#1=(APPLY #'MGL-MAT::SUBMATRIX
(MGL-MAT:MAT-TO-ARRAY MGL-MAT::MAT-C)
(ARRAY-DIMENSIONS MGL-MAT::C))
MGL-MAT::RESULT)
failed with #1# = #2A((218377.63042364857d0)), MGL-MAT::RESULT =
#2A((2.546922938428926d0)).
[Condition of type SIMPLE-ERROR]
Restarts:
0: [CONTINUE] Retry assertion.
1: [RETRY] Retry #<TEST-OP > on #<SYSTEM "mgl/test">.
2: [ACCEPT] Continue, treating #<TEST-OP > on #<SYSTEM "mgl/test"> as having been successful.
3: [RETRY] Retry ASDF operation.
4: [CLEAR-CONFIGURATION-AND-RETRY] Retry ASDF operation after resetting the configuration.
5: [RETRY] Retry ASDF operation.
--more--
Backtrace:
0: (SB-KERNEL:ASSERT-ERROR (CL-NUM-UTILS.NUM=:NUM= (APPLY (FUNCTION MGL-MAT::SUBMATRIX) (MGL-MAT:MAT-TO-ARRAY MGL-MAT::MAT-C) (ARRAY-DIMENSIONS MGL-MAT::C)) MGL-MAT::RESULT) 2 (APPLY (FUNCTION MGL-MAT::S..
1: ((LAMBDA NIL :IN MGL-MAT::TEST-GEMM!))
2: (MGL-MAT:CALL-WITH-CUDA #<FUNCTION (LAMBDA NIL :IN MGL-MAT::TEST-GEMM!) {53A2BCEB}> :ENABLED NIL :DEVICE-ID 0 :RANDOM-SEED 1234 :N-RANDOM-STATES 4096 :OVERRIDE-ARCH-P T :N-POOL-BYTES NIL)
3: (MGL-MAT::TEST-GEMM!)
4: (MGL-MAT::TEST)
5: (MGL-TEST:TEST)
6: (UIOP/PACKAGE:SYMBOL-CALL #:MGL-TEST #:TEST)
7: ((:METHOD ASDF/ACTION:PERFORM (ASDF/LISP-ACTION:TEST-OP (EQL #<ASDF/SYSTEM:SYSTEM "mgl/test">))) #<unused argument> #<unused argument>) [fast-method]
8: ((SB-PCL::EMF ASDF/ACTION:PERFORM) #<unused argument> #<unused argument> #<ASDF/LISP-ACTION:TEST-OP > #<ASDF/SYSTEM:SYSTEM "mgl/test">)
9: ((LAMBDA NIL :IN ASDF/ACTION:CALL-WHILE-VISITING-ACTION))
10: ((SB-PCL::SDFUN-METHOD ASDF/ACTION:PERFORM) #<unused argument> #<unused argument> #<ASDF/LISP-ACTION:TEST-OP > #<ASDF/SYSTEM:SYSTEM "mgl/test">)
11: ((:METHOD ASDF/ACTION:PERFORM-WITH-RESTARTS :AROUND (T T)) #<ASDF/LISP-ACTION:TEST-OP > #<ASDF/SYSTEM:SYSTEM "mgl/test">) [fast-method]
12: ((:METHOD ASDF/PLAN:PERFORM-PLAN (T)) #<ASDF/PLAN:SEQUENTIAL-PLAN {101658D813}>) [fast-method]
13: ((FLET SB-C::WITH-IT :IN SB-C::%WITH-COMPILATION-UNIT))
14: ((:METHOD ASDF/PLAN:PERFORM-PLAN :AROUND (T)) #<ASDF/PLAN:SEQUENTIAL-PLAN {101658D813}>) [fast-method]
15: ((LAMBDA (SB-PCL::.ARG0. SB-INT:&MORE SB-PCL::.MORE-CONTEXT. SB-PCL::.MORE-COUNT.) :IN "/home/luke/quicklisp/setup.lisp") #<ASDF/PLAN:SEQUENTIAL-PLAN {101658D813}>)
16: ((:METHOD ASDF/OPERATE:OPERATE (ASDF/OPERATION:OPERATION ASDF/COMPONENT:COMPONENT)) #<ASDF/LISP-ACTION:TEST-OP > #<ASDF/SYSTEM:SYSTEM "mgl"> :PLAN-CLASS NIL :PLAN-OPTIONS NIL) [fast-method]
17: ((SB-PCL::EMF ASDF/OPERATE:OPERATE) #<unused argument> #<unused argument> #<ASDF/LISP-ACTION:TEST-OP > #<ASDF/SYSTEM:SYSTEM "mgl">)
18: ((LAMBDA NIL :IN ASDF/OPERATE:OPERATE))
19: ((:METHOD ASDF/OPERATE:OPERATE :AROUND (T T)) #<ASDF/LISP-ACTION:TEST-OP > #<ASDF/SYSTEM:SYSTEM "mgl">) [fast-method]
--more--
I see this error when loading MGL:
Error finding package for symbol "DATA*":
The name "MGL-GNUPLOT" does not designate any package.
[Condition of type SB-KERNEL:SIMPLE-PACKAGE-ERROR]
A workaround is to manually evaluate mgl-gnuplot.asd
and run (require :mgl-gnuplot)
first.
The README says
CL-CUDA and MGL-MAT are the two main dependencies and also the ones not yet in quicklisp
but CL-CUDA is in fact included in Quicklisp now (apparently since quicklisp/quicklisp-projects#514 (comment)).
Maybe this means that MGL-MAT and MGL could now be included in Quicklisp too...?
Hey there, the links found in the README to http://quotenil.com are timing out. We link to that page from the awesome-cl repo for the mgl
entry: https://awesome-cl.com/#machine-learning
I just wanted to check if this is something you wanted to fix or if we should link somewhere else (like your GitHub user profile)?
Hello! Nice work there. I am beginner, and I would like to learn machine learning, and probably use your library for this purpose as well. However, right now it's kind of hard to see how things work; from my understanding, examples only show how to train neural networks, not how to use them.
For example, I would like to present other implementation of Recurrent Neural Network:
https://github.com/karpathy/char-rnn
The documentation(or "README", if you will) shows how to install dependencies(this is also kind of lacking, but that's for different conversation), and following the instructions you train and use your nn to generate text. Not so easy with examples in here - I only see how to train the network, but not how to actually use it. I would be very glad if you made some additional documentation.
Also, congratulations on amazing work.
Here is an attempt to write a 1d convolution lump. It is based on ->V*M. How would I continue with backpropagation?
(defclass-now ->conv (lump)
((x :initarg :x :reader x)
(weights
:initform (->weight :dimensions '(1 1))
:type ->weight :initarg :weights :reader weights
:documentation "A ->WEIGHT lump.")
(transpose-weights-p
:initform nil :initarg :transpose-weights-p
:reader transpose-weights-p
:documentation "Determines whether the input is multiplied by
WEIGHTS or its transpose.")
(kernel-size
:initform nil
:initarg :kernel-size
:reader kernel-size)
(num-filters
:initform nil
:initarg :num-filters
:reader num-filters)
(stride
:initform nil
:initarg :stride
:reader stride)
(out-size
:initform 1
:accessor out-size))
(:documentation "Perform (CONV X WEIGHTS) where X (the input) is of
size M and WEIGHTS is a ->WEIGHT whose single stripe is taken to
be of dimensions NUM-FILTERS x KERNEL-SIZE"))
(defmaker (->conv :unkeyword-args (x weights)))
(defmethod initialize-instance :after ((lump ->conv) &key &allow-other-keys)
(setf (slot-value (weights lump) 'dimensions)
(if (transpose-weights-p lump)
(list (kernel-size lump)(num-filters lump))
(list (num-filters lump) (kernel-size lump))))
;; force reshaping
(setf (max-n-stripes (weights lump)) (max-n-stripes (weights lump)))
(setf (slot-value lump 'out-size) (1+ (floor (- (size (x lump)) 1) (stride lump)))))
(defmethod default-size ((lump ->conv))
;;default size is equal to the output of conv operation
(1+ (floor (- (size (x lump)) 1) (stride lump))))
(defmethod forward ((lump ->conv))
(let* ((x1 (x lump))
(x (nodes (x lump)))
(weights (nodes (weights lump)))
(y (nodes lump))
(stride (list 1 (stride lump)))
(start '(0 0))
(anchor '(0 0)))
;; FIXEXT:
(assert (stripedp x1))
(if (transpose-weights-p lump)
;; a = x *conv w'
(error "->conv not implemented for transposed weights")
;; a = conv(x, w)
(convolve! x weights y :start start :stride stride :anchor anchor))))
(defmethod set-input (instances (conv simple-conv))
(let ((input-nodes (nodes (find-clump 'input conv))))
(fill! 0 input-nodes)
(loop for instance in instances
for i upfrom 0
do
(loop for j upfrom 0
for digit in instance
do (setf (mref input-nodes i j) digit)))))
(defclass simple-conv (fnn) ())
(defun make-conv-fnn (&key(input-size 5)(num-filters 1)(kernel-size 3)(stride 2))
(build-fnn (:class 'simple-conv)
(input (->input :size input-size :name 'input))
(bias (->weight :size (1+ (floor (- input-size 1) stride)) :name 'bias))
(w (->weight :name 'filter :size num-filters))
(conv (->conv input w :kernel-size kernel-size :num-filters num-filters :stride stride))
(conv-act (->+ (list conv bias) :name 'conv-act))
(relu (->relu conv-act))))
One can then do the following to test:
(let* ((input-size 7)
(num-filters 3)
(tconv (make-conv-fnn :input-size input-size :num-filters num-filters :kernel-size 4 :stride 2)))
(map-segments (lambda (weights)
(let* ((fan-in (mat-dimension (nodes weights) 0))
(limit (sqrt (/ 6 fan-in))))
(uniform-random! (nodes weights)
:limit (* 2 limit))
(.+! (- limit) (nodes weights))))
tconv)
(setf (max-n-stripes tconv) num-filters)
(set-input (loop repeat num-filters
collect (alexandria:shuffle
(loop repeat input-size collect (random 10.0))))
tconv)
(forward tconv)
tconv)
Hello. I want to create seq2seq model using this library. But, I cannot find how to send the hidden state of '"encoder" to it of '"decoder". I can see "cell-init" in "->lstm".
Can you create hidden state's accessor in "->lstm"๏ผ
Building with SBCL 2.3.1.122-1455d60f6 / ASDF 3.3.5 for quicklisp dist creation.
Trying to build commit id 4b1800a
mgl-example fails to build because of a failure in mgl.
mgl fails to build with the following error:
; caught ERROR:
; READ error during COMPILE-FILE: Package CLNU does not exist. Line: 358, Column: 31, File-Position: 14418 Stream: #<SB-INT:FORM-TRACKING-STREAM for "file /home/quicklisp/quicklisp-controller/dist/build-cache/mgl/671f22917b8b7253de38560bd7b459c1aabd2ee5/mgl-20230417-git/src/gaussian-process.lisp" {101EF129E3}>
...
Unhandled UIOP/LISP-BUILD:COMPILE-FILE-ERROR in thread #<SB-THREAD:THREAD "main thread" RUNNING {1001728003}>: COMPILE-FILE-ERROR while compiling #<CL-SOURCE-FILE "mgl" "src" "gaussian-process">
mgl/test fails to build because of a failure in mgl.
When the test function of a confusion matrix is 'equal
, calculation of precision, recall, and accuracy falls apart.
A simple test case below:
(mgl:measure-confusion
'("a" "b" "c" "a" "b" "a")
'("a" "b" "c" "a" "b" "a")
:test 'equal)
And the output is:
=> #<MGL-CORE:CONFUSION-MATRIX
| a| b| c|Recall
a| 3| 0| 0| 0.00%
b| 0| 2| 0| 0.00%
c| 0| 0| 1| 0.00%
Precision|NIL|NIL|NIL|
Accuracy: 0.00%>
Expected: Everything (accuracy, precision, and recall) should be 100% in the above matrix.
The math notation doesn't seem to be formatted in the HTML documentation e.g. at https://melisgl.github.io/mgl-pax-world/mgl-manual.html#x-28MGL-GD-3A-40MGL-GD-SGD-OPTIMIZER-20MGL-PAX-3ASECTION-29.
The documentation on my machine (Chrome, Linux) looks like:
$$\Delta_w^{t+1} = momentum \Delta_w^t + \frac{accumulator}{batchsize} + l_2 w + l_1 sign(w)$$
$$w^{t+1} = w^{t} - learningrate \Delta_w$$
which is the same as the more traditional formulation:
$$\Delta_w^{t+1} = momentum * \Delta_w^{t} + learningrate \left(\frac{\frac{df}{dw}}{batchsize} + l_2 w + l_1 sign(w)\right)$$
$$w^{t+1} = w^{t} - \Delta_w$$```
Hello!
Then I enter "(ql:quickload 'mgl)" there is an error:
`Subprocess #<UIOP/LAUNCH-PROGRAM::PROCESS-INFO {100487DE63}>
with command ("cc" "-o"
"/home/iam/.cache/common-lisp/sbcl-2.2.11-linux-x64/home/iam/quicklisp/dists/quicklisp/software/mgl-mat-20220220-git/src/cublas-grovel__grovel-tmpHFNPYN8O.o"
"-c" "-I" "/usr/local/cuda/include/"
"-march=x86-64" "-mtune=generic" "-O2" "-pipe"
"-fno-plt" "-fexceptions"
"-Wp,-D_FORTIFY_SOURCE=2" "-Wformat"
"-Werror=format-security"
"-fstack-clash-protection" "-fcf-protection"
"-flto=auto" "-D_GNU_SOURCE"
"-fno-omit-frame-pointer"
"-DSBCL_HOME=/usr/lib/sbcl" "-g" "-Wall"
"-Wundef" "-Wsign-compare" "-Wpointer-arith"
"-O3" "-D_LARGEFILE_SOURCE"
"-D_LARGEFILE64_SOURCE" "-D_FILE_OFFSET_BITS=64"
"-Wunused-parameter" "-fno-omit-frame-pointer"
"-momit-leaf-frame-pointer" "-fPIC"
"-I/home/iam/quicklisp/dists/quicklisp/software/cffi_0.24.1/"
"/home/iam/.cache/common-lisp/sbcl-2.2.11-linux-x64/home/iam/quicklisp/dists/quicklisp/software/mgl-mat-20220220-git/src/cublas-grovel__grovel.c")
exited with error code 1
Environment: Manjaro Linux, SBCL 2.26.1
Noted this while going through the generated documentation for the library. I'd like to use it on Windows if I can; Is there a set of tests to run that verifies basic functionality without significant randomness?
The few times I've run the tests it has failed in different places with invalid floating point operations.
Some work getting cl-cuda
running on Windows has been done at takagi/cl-cuda#70. My environment is detailed in this comment.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.