Fine tuning, use stopbackward=1 in the cfg-file in that layer where Backward should be stopped.
| | |
| | | int classfix; |
| | | int absolute; |
| | | |
| | | int onlyforward; |
| | | int stopbackward; |
| | | int dontload; |
| | | int dontloadscales; |
| | | |
| | |
| | | state.delta = prev.delta; |
| | | } |
| | | layer l = net.layers[i]; |
| | | if (l.stopbackward) break; |
| | | l.backward(l, state); |
| | | } |
| | | } |
| | |
| | | for(i = net.n-1; i >= 0; --i){ |
| | | state.index = i; |
| | | layer l = net.layers[i]; |
| | | if (l.stopbackward) break; |
| | | if(i == 0){ |
| | | state.input = original_input; |
| | | state.delta = original_delta; |
| | |
| | | }else{ |
| | | fprintf(stderr, "Type not recognized: %s\n", s->type); |
| | | } |
| | | l.onlyforward = option_find_int_quiet(options, "onlyforward", 0); |
| | | l.stopbackward = option_find_int_quiet(options, "stopbackward", 0); |
| | | l.dontload = option_find_int_quiet(options, "dontload", 0); |
| | | l.dontloadscales = option_find_int_quiet(options, "dontloadscales", 0); |
| | | option_unused(options); |