Open fabiospampinato opened 1 year ago
whoops, we didn't publish the latest code with sequential and Adam included. Version 0.0.11 should be good now!
Adam is unfortunately a bit buggy at the moment so I changed the example to use sgd
Awesome, it seems to do something now, thank you.
Some more questions if you don't mind:
sm.module.sequential
, or for example sm.module.linear
says it accepts inp_dim: any, out_dim: any
, rather than numbers, which doesn't help with trying to figure things out.m(x)
?viter
function I'm not sure what is doing. sm.util.range
in const i of sm.util.range(3)
seems unnecessary) and where there are some, even minimal, comments about what these functions do (maybe most of these are "obvious", but like no other ML framework seems to have a function named "viter", and I can't find anything for "ema loss" either). Can something like this be added?Thanks.
I'd like to build a little feed-forward fully connected thing with just one hidden layer, I looked at the examples but perhaps the most relevant one, train.ts, doesn't seem to work anymore as things like
sm.module.sequential
andsm.optim.Adam
don't seem to exist anymore.It would be great to get that example fixed.
In general it would also be great to get a sort of simpler and more exhaustive "getting started" example, like a tiny model that learns XOR that showcases how to build the network (perhaps with 1 hidden layer for the sake of showcasing how to do it), how to feed it data for training, and how to validate it with more data afterwards.
At the moment I'm a bit stuck, I have the dataset, I had the network sort of working on top of
Brain.js
(too slow), but I don't know what Shumai code I should write to recreate the same network and training/testing "pipeline".