<commit_before># ConvNetSharp
C# port of [ConvNetJS](https://github.com/karpathy/convnetjs)

## Disclaimers
- Work in progress: some code may be incomplete. In mnist demo, the algorithm is not converging as fast as in Andrej Karparthy implementation -> Something is fishy.
- I haven't included mnist data files. You need to download them from http://yann.lecun.com/exdb/mnist/ into ConvNetSharp\MnistDemo\bin\Release\Mnist before running mnit demo.

Thank you very much to the original author (<NAME>) and to all the contributors to ConvNetJS!

## Example Code

Here's a minimum example of defining a **2-layer neural network** and training
it on a single data point:
```c#
  // species a 2-layer neural network with one hidden layer of 20 neurons
  var net = new Net();

  // input layer declares size of input. here: 2-D data
  // ConvNetJS works on 3-Dimensional volumes (width, height, depth), but if you're not dealing with images
  // then the first two dimensions (width, height) will always be kept at size 1
  net.AddLayer(new InputLayer(1, 1, 2));

  // declare 20 neurons, followed by ReLU (rectified linear unit non-linearity)
  net.AddLayer(new FullyConnLayer(20, Activation.Relu));

  // declare the linear classifier on top of the previous hidden layer
  net.AddLayer(new SoftmaxLayer(10));

  // forward a random data point through the network
  var x = new Volume(new[] {0.3, -0.5});<commit_msg>Mnist files target location has changed<commit_after># ConvNetSharp
C# port of [ConvNetJS](https://github.com/karpathy/convnetjs)

## Disclaimers
- Work in progress: some code may be incomplete. In mnist demo, the algorithm is not converging as fast as in Andrej Karparthy implementation -> Something is fishy.
- I haven't included mnist data files. You need to download them from http://yann.lecun.com/exdb/mnist/ into ConvNetSharp\MnistDemo\Mnist\ before running Mnist demo.

Thank you very much to the original author (<NAME>) and to all the contributors to ConvNetJS!

## Example Code

Here's a minimum example of defining a **2-layer neural network** and training
it on a single data point:
```c#
  // species a 2-layer neural network with one hidden layer of 20 neurons
  var net = new Net();

  // input layer declares size of input. here: 2-D data
  // ConvNetJS works on 3-Dimensional volumes (width, height, depth), but if you're not dealing with images
  // then the first two dimensions (width, height) will always be kept at size 1
  net.AddLayer(new InputLayer(1, 1, 2));

  // declare 20 neurons, followed by ReLU (rectified linear unit non-linearity)
  net.AddLayer(new FullyConnLayer(20, Activation.Relu));

  // declare the linear classifier on top of the previous hidden layer
  net.AddLayer(new SoftmaxLayer(10));

  // forward a random data point through the network
  var x = new Volume(new[] {0.3, -0.5});
{'fraction_non_alphanumeric': 0.0897887323943662, 'fraction_numerical': 0.014084507042253521, 'mean_word_length': 3.992970123022847, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3886463', 'n_tokens_mistral': 884, 'n_tokens_neox': 807, 'n_words': 378}