attractivechaos / kann

A lightweight C library for artificial neural networks
Other
678 stars 117 forks source link

resnet #49

Closed cpppx closed 2 years ago

cpppx commented 2 years ago

I want apply it to resent, so I write

kad_node_t *basic_block(kad_node_t *x, int channel)
{
    kad_node_t *y = kad_relu(kann_layer_conv2d(x, channel, 3, 3, 1, 1, 1, 1));
    y = kann_layer_conv2d(y, channel, 3, 3, 1, 1, 1, 1);
    return kad_relu(kad_add(x, y));
}

but it will arise segmentation fault