BTW, if anyone is pursuing this further, JavaScript supports binary
arrays (I've used them in some WebGL work I've been doing), and browser
coverage is rather good:  http://caniuse.com/#feat=typedarrays

What that means (in rough order of usefulness):
  1. It loads into memory directly - the alternative is that 14MB of
JavaScript needs to be parsed;

  2. Minor file size saving (it is only minor, because the text file
version would almost certainly be served gzipped, and text files
compress really well);

  3. You don't need to truncate the precision;

  4. Minor web server CPU saving (point 2: no need to gzip).

Darren

> It has a 14MB file which looks like:
>
> // 8 layer network trained on GoGoD data, truncated to 6 decimal places
> to reduce size
> var json_net = {"layers": [{"layer_type": "input", "out_sy": 25,
> "out_depth": 8, "out_sx": 25}, {"layer_type"
> : "conv", "sy": 25, "sx": 25, "out_sx": 19, "out_sy": 19, "stride": 1,
> "pad": 0, "biases": {"depth":
>  64, "sx": 1, "sy": 1, "w": [0.519023, -1.379795, -0.495255, -0.051380,
> -0.466160, -1.380873, -0.630742
> , -0.174662, -0.743714, -1.288785, -0.607110, -0.536119, -0.819585,
> -0.248130, -0.629681, -0.004683,
>  -0.408890, -1.701742, -0.011255, -0.833270, -0.665327, -0.127002,
> -0.793772, -0.518614, -1.390844, -1
> .982825, -0.012530, -0.140848, -1.255086, -0.761665, -0.077154,
> -0.748323, -0.086952, -0.175683, -1.526860
> , 0.098685, -0.030402, -0.903232, -
> ...


-- 
Darren Cook, Software Researcher/Developer
My new book: Data Push Apps with HTML5 SSE
Published by O'Reilly: (ask me for a discount code!)
  http://shop.oreilly.com/product/0636920030928.do
Also on Amazon and at all good booksellers!
_______________________________________________
Computer-go mailing list
Computer-go@computer-go.org
http://computer-go.org/mailman/listinfo/computer-go

Reply via email to