Skip to content

Instantly share code, notes, and snippets.

View hamukazu's full-sized avatar

Kimikazu Kato hamukazu

View GitHub Profile
diff -u -r cnn_orig/convolutional_mlp.py cnn/convolutional_mlp.py
--- cnn_orig/convolutional_mlp.py 2014-08-08 12:15:47.412611962 +0900
+++ cnn/convolutional_mlp.py 2014-08-08 12:18:02.684614501 +0900
@@ -37,6 +37,18 @@
from logistic_sgd import LogisticRegression, load_data
from mlp import HiddenLayer
+from PIL import Image
+
+def pack(m,n,a):
(require 'clojure.set)
(defn perms [n s]
(if (zero? n) '(())
(reduce (fn [x y] (let [m (dec n) ss (clojure.set/difference s #{y})]
(concat x (map (fn [z] (cons y z)) (perms m ss)))))
() s)))
(defn solv [a]
(def b (vec a))
(def appeared (set a))