We're getting warmer in jconsole. But I cannot find `simple_conv_test.ijs`
as you can see at the bottom.
Btw, I never have used jQt for projects successfully, so I could not figure
out how to put the clone into the projects there.
load jpath '~Projects/jlearn/init.ijs'
not found: /users/brian/j64-807-user/projects/jlearn/init.ijs
|file name error: script
| 0!:0 y[4!:55<'y'
load'/Users/brian/j64-807-user/projects/jlearn/init.ijs'
not found: /users/brian/j64-807/addons/tables/csv/csv.ijs
|file name error: script
| 0!:0 y[4!:55<'y'
load'/Users/brian/j64-807-user/projects/jlearn/init.ijs'
1
Test success Simple GMM test, diagonal covariance
...
load jpath '~temp/simple_conv_test.ijs'
not found: /users/brian/j64-807-user/temp/simple_conv_test.ijs
On Fri, Apr 19, 2019 at 12:35 AM jonghough via Programming <
[email protected]> wrote:
> Even though I have used J on and off for a few eyars now, I have not
> really used jConsole at all. But I did just try it:
> **************************************
> shell-promtp> ./jconsole
>
> load jpath '~Projects/jlearn/init.ijs'
> ...
> load jpath '~temp/simple_conv_test.ijs'
>
> OUTPUT fit__pipe INPUT
>
> **************************************
>
> The above should work.
> My project is in Projects/jlearn
> My test script it in temp/simple_conv_test.ijs
>
> You may have you repository clone in some other location, so you will have
> to find it when you load init.ijs.
> On Friday, April 19, 2019, 1:25:03 PM GMT+9, jonghough via
> Programming <[email protected]> wrote:
>
> Sorry, as I said in a previous email, the example I gave with runConv
> will not work, as it was made for a much older version of the project.
> Please try this as is, in jqt.
>
> NB. ==============================
> 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 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 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'
> c1=: ((10 3 4 4);2;'relu';'adam';0.01;0) conew 'Conv2D'
> b1=: (0; 1 ;0.0001;10;0.01) conew 'BatchNorm2D'
> a1=: 'relu' conew 'Activation'
>
> c2=: ((12 10 2 2); 1;'relu';'adam';0.01;0) conew 'Conv2D'
> b2=: (0; 1 ;0.0001;5;0.01) conew 'BatchNorm2D'
> a2=: 'relu' conew 'Activation'
> p1=: 2 conew 'PoolLayer'
>
> fl=: 3 conew 'FlattenLayer'
> fc=: (12;3;'softmax';'adam';0.01) conew 'SimpleLayer'
> b3=: (0; 1 ;0.0001;2;0.01) conew 'BatchNorm'
> a3=: 'softmax' conew 'Activation'
>
> addLayer__pipe c1
> addLayer__pipe p1
> NB.addLayer__pipe b1
> addLayer__pipe a1
> addLayer__pipe c2
> NB.addLayer__pipe b2
> addLayer__pipe a2
> addLayer__pipe fl
> addLayer__pipe fc
> NB.addLayer__pipe b3
> addLayer__pipe a3
>
> NB. OUTPUT fit__pipe INPUT NB. <----- run this. maybe 3 or 4 times
> NB. OUTPUT -:"1 1 (=>./)"1 >{: predict__pipe INPUT NB. <----- then run
> this to check accuracy
>
> NB. ==============================
>
>
> I did all my work using jQT, not jconsole.
> My recommendation is:
> 1. open jqt and locate the project (hopefully you put it in projects
> folder)
> 2. load init.ijs (which will load everything)
> 3. put the above code into a J temp file.
> 4. run the temp file (and remember to run this line: OUTPUT fit__pipe
> INPUT ) On Friday, April 19, 2019, 1:05:52 PM GMT+9, Brian Schott <
> [email protected]> wrote:
>
> 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
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
--
(B=) <-----my sig
Brian Schott
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm