karpathy / convnetjs

Deep Learning in Javascript. Train Convolutional Neural Networks (or ordinary ones) in your browser.
MIT License
10.9k stars 2.04k forks source link

Allow specific input shape #99

Open doomedramen opened 6 years ago

doomedramen commented 6 years ago

Currently it assumes the input layer is 1x1xINPUT_LENGTH. This does not support 2D or 3D inputs, my changes allow the user to specify the shape.

doomedramen commented 6 years ago

This could also be achieved by getting the X,Y,Z sizes from the input data:

layer_defs.push({type: 'input', out_sx: this.data[0].sx:, out_sy: this.data[0].sy, out_depth:this.data[0].depth});

this is currently hard coded to:

layer_defs.push({type: 'input', out_sx: 1, out_sy: 1, out_depth: input_depth});
TrevorBlythe commented 2 years ago

It works the same either way bruh.

371148606 commented 2 years ago

您好,我是薛文毅,已收到您的邮件,一会查收,谢谢!!