jatinchowdhury18 / RTNeural

Real-time neural network inferencing
BSD 3-Clause "New" or "Revised" License
582 stars 58 forks source link

Fix log + Use const ints to define model shapes #106

Closed proshian closed 1 year ago

proshian commented 1 year ago

Thank you for development of this framework! I've just started using it, but it already seems a very good choice for my needs

I made some tiny changes to torch_gru.cpp example:

  1. Fix console log of torch_gru.cpp example:

    "Running \"torch conv1d\" example..."

    ->

    "Running \"torch gru\" example..."
  2. I think that it would be easier for an inexperienced person to understand ModelType definition if the shapes were named const integers rather than literals. So I made this change:

using ModelType = RTNeural::ModelT<float, 1, 1, RTNeural::GRULayerT<float, 1, 8>, RTNeural::DenseT<float, 8, 1>>;

->

const int gru_input_size = 1;
const int gru_hidden_size = 8;
const int n_output_neurons = 1;

using ModelType = RTNeural::ModelT<float,
    gru_input_size, n_output_neurons,
    RTNeural::GRULayerT<float, gru_input_size, gru_hidden_size>,
    RTNeural::DenseT<float, gru_hidden_size, n_output_neurons>>;
codecov-commenter commented 1 year ago

Codecov Report

Merging #106 (153a3d3) into main (113f6e2) will not change coverage. The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #106   +/-   ##
=======================================
  Coverage   95.75%   95.75%           
=======================================
  Files          55       55           
  Lines        3953     3953           
=======================================
  Hits         3785     3785           
  Misses        168      168           

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more