Skip to content

How to create and use a convolutional neural net? #4

@Booley

Description

@Booley

Hi, I'm interested in using synaptic for a project but I'm having a tough time figuring out how to use a convolutional neural net. I'm using the following code do a simple create and test:

(def cnn (neural-net [{:type :input :fieldsize [28 28]}
                      {:type :convolution :act-fn :hyperbolic-tangent
                       :feature-map {:size [9 9] :k 3}
                       :pool {:kind :max :size [2 2]}}
                      {:type :fully-connected :act-fn :sigmoid :n 10}]
                     (training :backprop {:learning-rate {:epsilon 0.01}})))

(def row (vec (repeat (* 28 28) 1)))
(def output (vec (repeat 10 1)))

(def trset (training-set [row row] [output output]))
(train cnn trset 3)
@*1
(-> @cnn :training :stats)

However, the stats always say 0 epochs have been run (no matter how long I wait) and no exception is thrown. What's the proper way of creating a training set and using the convolutional neural net?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions