micrograd 0.1.0
Small C implementation of micrograd
Loading...
Searching...
No Matches
neuron.h File Reference

Fully connected neuron API. More...

#include <stdbool.h>
#include <stddef.h>
#include "micrograd/value.h"
Include dependency graph for neuron.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  mg_neuron
 Fully connected neuron in a neural network. More...
 

Functions

bool mg_neuron_init (mg_graph *g, mg_neuron *n, size_t nin, bool non_linear)
 Initialize a neuron.
 
void mg_neuron_free (mg_neuron *n)
 Free memory owned by a neuron.
 
mg_valuemg_neuron_call (mg_graph *g, mg_neuron *n, mg_value **x)
 Evaluate a neuron with the given input values.
 
size_t mg_neuron_param_count (const mg_neuron *n)
 Get the number of trainable parameters in a neuron.
 
void mg_neuron_params (const mg_neuron *n, mg_value **out)
 Copy a neuron's parameters into a flat array.
 

Detailed Description

Fully connected neuron API.