| 3192 | template <unsigned long n, typename SUBNET> using rfc = relu<bn_fc<fc<n,SUBNET>>>; |
| 3193 | |
| 3194 | void test_tagging( |
| 3195 | ) |
| 3196 | { |
| 3197 | typedef loss_multiclass_log<rfc<10,skip1<rfc<84,rfc<120,tag1<rcon<16,rcon<6,input<matrix<unsigned char>>>>>>>>>> net_type; |
| 3198 | |
| 3199 | net_type net; |
| 3200 | net_type net2(num_fc_outputs(4)); |
| 3201 | |
| 3202 | DLIB_TEST(layer<tag1>(net).num_computational_layers == 8); |
| 3203 | DLIB_TEST(layer<skip1>(net).num_computational_layers == 8+3+3); |
| 3204 | DLIB_TEST(layer<tag1>(net).num_layers == 10); |
| 3205 | DLIB_TEST(layer<skip1>(net).num_layers == 10+3+3+1); |
| 3206 | DLIB_TEST(&layer<skip1>(net).get_output() == &layer<tag1>(net).get_output()); |
| 3207 | DLIB_TEST(&layer<skip1>(net).get_output() != &layer<tag1>(net).subnet().subnet().get_output()); |
| 3208 | DLIB_TEST(net.subnet().subnet().subnet().layer_details().get_num_outputs() == 10); |
| 3209 | DLIB_TEST(net2.subnet().subnet().subnet().layer_details().get_num_outputs() == 4); |
| 3210 | } |
| 3211 | |
| 3212 | // ---------------------------------------------------------------------------------------- |
| 3213 |
no test coverage detected