Skip to content

Instantly share code, notes, and snippets.

@baymac
Created October 16, 2021 18:00
Show Gist options
  • Save baymac/2680e491f69b6084ac64ef639f35f02d to your computer and use it in GitHub Desktop.
Save baymac/2680e491f69b6084ac64ef639f35f02d to your computer and use it in GitHub Desktop.
layer*[] split(network *net, LAYER_TYPE layer_type) {
layer *split_layer = net->layers;
int i = 0;
while(layer_type != split_layer->type) {
split_layer++;
i++;
}
// a b c d e f
// 0, 3
return [0, i];
return [net->layers, split_layer];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment