<commit_before>
#include "Neural_Net.hpp"
#include <cmath>
#include <iostream>

using namespace Eigen;

double Neural_Net_Functions::sigmoid(const double input) const
{
   return 1.0 / (1.0 + exp(-input));
}


Neural_Net::Neural_Net(
      VectorXd &weight_sizes,
      Neural_Net_Functions *functions) :
   _layer_size(weight_sizes.size()),
   _weights(),
   _bias(),
   _activations(),
   _functions(functions)
{
   _bias.push_back(VectorXd::Random(weight_sizes[0]));
   _activations.push_back(VectorXd::Constant(weight_sizes[0], 0.0));
   for(int i = 1; i < _layer_size; i++)
   {
      _weights.push_back(MatrixXd::Random(weight_sizes[i], weight_sizes[i-1]));
      _bias.push_back(VectorXd::Random(weight_sizes[i]));
      _activations.push_back(VectorXd::Constant(weight_sizes[i], 0.0));
   }
}

Neural_Net::~Neural_Net()
{
}

void Neural_Net::vec_sigmoid(unsigned int layer)
{
   
}

void Neural_Net::print_neural_net()
{
   for (unsigned int layer=0; layer<_layer_size; layer++)
   {
      std::cout << "layer number " << layer << std::endl;
      if (layer == 0)
      {
         std::cout << "input layer" << std::endl;
      } else
      {
         if (layer == _layer_size-1)
         {
            std::cout << "output layer" << std::endl;
         }
         std::cout << "weights" << std::endl;
         std::cout << _weights[layer-1] << std::endl;
      }
      std::cout << "bias" << std::endl;
      std::cout << _bias[layer] << std::endl;
         std::cout << "activation" << std::endl;
      std::cout << _activations[layer] << std::endl;
      std::cout << std::endl;
   }
}
<commit_msg>forgot to save a file<commit_after>
#include "Neural_Net.hpp"
#include <cmath>
#include <iostream>

using namespace Eigen;

double Neural_Net_Functions::sigmoid(const double input) const
{
   return 1.0 / (1.0 + exp(-input));
}


Neural_Net::Neural_Net(
      VectorXd &weight_sizes,
      Neural_Net_Functions *functions) :
   _layer_size(weight_sizes.size()),
   _weights(),
   _bias(),
   _activations(),
   _functions(functions)
{
   _bias.push_back(VectorXd::Random(weight_sizes[0]));
   _activations.push_back(VectorXd::Constant(weight_sizes[0], 0.0));
   for(int i = 1; i < _layer_size; i++)
   {
      _weights.push_back(MatrixXd::Random(weight_sizes[i], weight_sizes[i-1]));
      _bias.push_back(VectorXd::Random(weight_sizes[i]));
      _activations.push_back(VectorXd::Constant(weight_sizes[i], 0.0));
   }
}

Neural_Net::~Neural_Net()
{
}

void Neural_Net::vec_sigmoid(unsigned int layer)
{
}

void Neural_Net::print_neural_net()
{
   for (unsigned int layer=0; layer<_layer_size; layer++)
   {
      std::cout << "layer number " << layer << std::endl;
      if (layer == 0)
      {
         std::cout << "input layer" << std::endl;
      } else
      {
         if (layer == _layer_size-1)
         {
            std::cout << "output layer" << std::endl;
         }
         std::cout << "weights" << std::endl;
         std::cout << _weights[layer-1] << std::endl;
      }
      std::cout << "bias" << std::endl;
      std::cout << _bias[layer] << std::endl;
         std::cout << "activation" << std::endl;
      std::cout << _activations[layer] << std::endl;
      std::cout << std::endl;
   }
}

{'fraction_non_alphanumeric': 0.17256362507759157, 'fraction_numerical': 0.009931719428926133, 'mean_word_length': 3.2575957727873184, 'pattern_counts': {'":': 0, '<': 91, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1259619', 'n_tokens_mistral': 1184, 'n_tokens_neox': 1161, 'n_words': 196}