unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#31293] [PATCH] gnu: Add python-autograd
@ 2018-04-28  3:47 Fis Trivial
  2018-04-28 21:33 ` bug#31293: " Ludovic Courtès
  0 siblings, 1 reply; 2+ messages in thread
From: Fis Trivial @ 2018-04-28  3:47 UTC (permalink / raw)
  To: 31293


* gnu/packages/machine-learning.scm (python-autograd, python2-autograd): New
variables.
---
 gnu/packages/machine-learning.scm | 44 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 44 insertions(+)

diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm
index 12384a103..e2b113a70 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -6,6 +6,7 @@
 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2018 Mark Meyer <mark@ofosos.org>
 ;;; Copyright © 2018 Ben Woodcroft <donttrustben@gmail.com>
+;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -688,3 +689,46 @@ mining and data analysis.")
 
 (define-public python2-scikit-learn
   (package-with-python2 python-scikit-learn))
+
+(define-public python-autograd
+  (let* ((commit "442205dfefe407beffb33550846434baa90c4de7")
+         (revision "0")
+         (version (git-version "0.0.0" revision commit)))
+    (package
+      (name "python-autograd")
+      (home-page "https://github.com/HIPS/autograd")
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url home-page)
+                      (commit commit)))
+                (sha256
+                 (base32
+                  "189sv2xb0mwnjawa9z7mrgdglc1miaq93pnck26r28fi1jdwg0z4"))
+                (file-name (git-file-name name version))))
+      (version version)
+      (build-system python-build-system)
+      (native-inputs
+       `(("python-nose" ,python-nose)
+         ("python-pytest" ,python-pytest)))
+      (propagated-inputs
+       `(("python-future" ,python-future)
+         ("python-numpy" ,python-numpy)))
+      (arguments
+       `(#:phases (modify-phases %standard-phases
+                    (replace 'check
+                      (lambda _
+                        (invoke "py.test" "-v"))))))
+      (synopsis "Efficiently computes derivatives of numpy code")
+      (description "Autograd can automatically differentiate native Python and
+Numpy code.  It can handle a large subset of Python's features, including loops
+, ifs, recursion and closures, and it can even take derivatives of derivatives
+of derivatives.  It supports reverse-mode differentiation
+(a.k.a. backpropagation), which means it can efficiently take gradients of
+scalar-valued functions with respect to array-valued arguments, as well as
+forward-mode differentiation, and the two can be composed arbitrarily.  The
+main intended application of Autograd is gradient-based optimization.")
+      (license license:expat))))
+
+(define-public python2-autograd
+  (package-with-python2 python-autograd))
-- 
2.14.3


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* bug#31293: [PATCH] gnu: Add python-autograd
  2018-04-28  3:47 [bug#31293] [PATCH] gnu: Add python-autograd Fis Trivial
@ 2018-04-28 21:33 ` Ludovic Courtès
  0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2018-04-28 21:33 UTC (permalink / raw)
  To: Fis Trivial; +Cc: 31293-done

[-- Attachment #1: Type: text/plain, Size: 204 bytes --]

Fis Trivial <ybbs.daans@hotmail.com> skribis:

> * gnu/packages/machine-learning.scm (python-autograd, python2-autograd): New
> variables.

Applied with the changes below.  Thank you!

Ludo’.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 1117 bytes --]

diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm
index e2b113a70..d3af35e17 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -719,10 +719,10 @@ mining and data analysis.")
                     (replace 'check
                       (lambda _
                         (invoke "py.test" "-v"))))))
-      (synopsis "Efficiently computes derivatives of numpy code")
+      (synopsis "Efficiently computes derivatives of NumPy code")
       (description "Autograd can automatically differentiate native Python and
-Numpy code.  It can handle a large subset of Python's features, including loops
-, ifs, recursion and closures, and it can even take derivatives of derivatives
+NumPy code.  It can handle a large subset of Python's features, including loops,
+ifs, recursion and closures, and it can even take derivatives of derivatives
 of derivatives.  It supports reverse-mode differentiation
 (a.k.a. backpropagation), which means it can efficiently take gradients of
 scalar-valued functions with respect to array-valued arguments, as well as

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-04-28 21:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-28  3:47 [bug#31293] [PATCH] gnu: Add python-autograd Fis Trivial
2018-04-28 21:33 ` bug#31293: " Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).