I have now cloned the repo and below I show my directory.

server:~ brian$ cd /Users/brian/j64-807-user/nn
server:nn brian$ pwd
/Users/brian/j64-807-user/nn
server:nn brian$ ls /Users/brian/j64-807-user/nn/jlearn-master
LICENSE init.ijs optimize
README.md iris_som_all.png plot
adv iris_som_clusters.png rbf
clustering iris_som_planes.png run.ijs
datasets iris_som_umatrix.png score
densityestimation jlearn.gif serialize
dr jlearn.jproj solverexamples
energy kdtree som
ensemble knn test
genetic linear text
gp mixtures trees
impute mlp utils
server:nn brian$



 Below is what I copied into jconsole.

cocurrent 'NN'
coclass 'Conv2D'
coinsert 'NNLayer'
cocurrent'NNPipeline'
create=: 3 : 0
if. a: -: y do.
    bias=: ''
    ''
else.
    'shape stride activation solverType alpha clampFlg'=: y
    assert. 4 = # shape NB. wxhxdinxdout
    assert. 1 <: stride
    assert. alpha > 0
    ks=: 2 3 $ (3 # stride) ,}.shape     NB. kernel shape
    filter=: activation createRandomWeightsNormal shape
    reordered=: 1 0 2 3 |: filter
    setActivationFunctions activation
    solver=: (<filter) setSolver tolower solverType
    e__solver=: alpha
    bias=: ''
    clampLow=: _1
    clampHigh=: 1
    clampV=: ]
    if. clampFlg do. clampV=: clamp end.
    type=: 'Conv2D'
end.
)


A1=: 3 8 8 $ 1 1 1 1 1 1 1 1, 0 0 0 0 0 0 0 0, 0 0 0 0 0 0 0 0, 1 1 1 1 1 1
1 1, 0 0 0 0 0 0 0 0, 1 1 1 1 1 1 1 1, 1 1 1 1 1 1 1 1, 0 0 0 0 0 0 0 0, 0
0 0 0 0 0 0 0
A2=: 3 8 8 $ 1 1 1 1 1 1 1 1, 0 0 0 0 0 0 0 0, 1 1 1 1 1 1 1 1, 1 1 1 1 1 1
1 1, 0 0 0 0 0 0 0 0
A3=: 3 8 8 $ 1 1 1 1 1 1 1 1, 0 0 0 0 0 0 0 0, 0 0 0 0 0 0 0 0
A4=: 3 8 8 $ 1 1 1 1 1 1 1 1, 0 0 0 0 0 0 0 0, 0 0 0 0 0 0 0 0, 1 1 1 1 1 1
1 1, 1 1 1 1 1 1 1 1, 0 0 0 0 0 0 0 0
A5=: 2 |. A4

B1=: |:"2 A1
B2=: |:"2 A2
B3=: |:"2 A3
B4=: |:"2 A4
B5=: |:"2 A5

C1=: 3 8 8 $ 1 0 0 0 0 0 0 1, 0 1 0 0 0 0 1 0, 0 0 1 0 0 1 0 0, 0 0 0 1 1 0
0 0, 0 0 0 1 1 0 0 0, 0 0 1 0 0 1 0 0, 0 1 0 0 0 0 1 0, 1 0 0 0 0 0 0 1
C2=: 3 8 8 $ 1 0 0 0 0 0 0 0, 0 1 0 0 0 0 0 0, 0 0 1 0 0 0 0 0, 0 0 0 1 0 0
0 0, 0 0 0 0 1 0 0 0, 0 0 0 0 0 1 0 0, 0 0 0 0 0 0 1 0, 0 0 0 0 0 0 0 1
C3=: 3 8 8 $ 1 0 1 0 1 0 0 0, 0 1 0 1 0 1 0 0, 0 0 1 0 1 0 1 0, 0 0 0 1 0 1
0 1, 1 0 0 0 1 0 1 0, 0 1 0 0 0 1 0 1, 1 0 1 0 0 0 1 0, 0 1 0 1 0 0 0 1
C4=: |."1 C3
C5=: 3 8 8 $ 1 1 1 1 0 0 0 0, 0 0 1 1 1 1 0 0, 0 0 0 0 1 1 1 1, 1 1 0 0 0 0
1 1, 1 1 1 1 0 0 0 0, 0 0 1 1 1 1 0 0, 0 0 0 0 1 1 1 1, 1 1 0 0 0 0 1 1

A=: 5 3 8 8 $, A1, A2, A3, A4, A5
B=: 5 3 8 8 $, B1, B2, B3, B4, B5
C=: 5 3 8 8 $, C1, C2, C3, C4, C5

INPUT=: A,B,C
OUTPUT=: 15 3 $ 1 0 0, 1 0 0, 1 0 0, 1 0 0, 1 0 0, 0 1 0, 0 1 0, 0 1 0, 0 1
0, 0 1 0, 0 0 1, 0 0 1, 0 0 1, 0 0 1, 0 0 1

pipe=: (10;10;'softmax';1;'l2';0.0001) conew 'NNPipeline'
|value error: create__w
|       create__w x

Then I changed `create` a little to eliminate an assert and got another
error so I removed `clampFlg' from `pipe`. I got more errors trying to
enter `pipe` and decided to ask for help.

I now see that the above does NOT enclose the input in
runConv=: 3 : 0
)
like one of your previous statement of the example. Maybe that is a
problem, too.


Maybe with this info you can tell me how to connect the last example to
your cloned code?

Thanks,

On Thu, Apr 18, 2019 at 8:08 PM jonghough via Programming <
[email protected]> wrote:

>  >
> > pipe=: (10;10;'softmax';1;'l2';0.0001) conew 'NNPipeline'
> > |assertion failure: create__w
> > | 4 =#shape
> I think this assertion error is in 'Conv2D' (conv2d.ijs). Not
> 'NNPipeline'. The shape (first constructor argument needs 4 numbers)
> e.g.
> c1=: ((10 3 4 4);2;'relu';'adam';0.01;0) conew 'Conv2D'
>
> the shape is 10 3 4 4.
>
> If you copy pasted my example I can't see how you got an assertion error
> there. Did you clone the whole repo?
>
> Regards,
>
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to