Closed genekogan closed 8 years ago
What's input
in your code? Why it is not simply a
?
Also, the encode size required to be the input size of the network (227x227), which could be different from the normal input size for classification (255x255) check the dimension first and see how ccv_convnet_encode
is used in ccv_convnet_classify
ah sorry that was a typo, it was &a
in my code, not &input
.
yes thank you! the input size was the issue. i was able to get it to run successfully with:
ccv_dense_matrix_t* a = 0;
ccv_size_t size = ccv_size(225, 225);
ccv_convnet_input_formation(size, &image, &a);
ccv_dense_matrix_t* b = 0;
ccv_convnet_encode(convnet, &a, &b, 1);
i'm a bit unclear on how to interpret the result. b is now a 1000x1 matrix. are these the final activations of the 1000 output classes? does it make sense to use this as a compact representation of the image, or perhaps the layer before the outputs is better?
Yes, it is the final activations for the last 1000 output classes. You should just the layer before this as compact representation of the image.
thanks!
Great project!
I am trying to encode a single image using
ccv_convnet_encode
but getting assertion errors that I haven't figured out how to solve.which fails with this assertion:
Assertion failed: ((*a)->rows == convnet->rows), function ccv_convnet_encode, file ccv_convnet.c, line 648.
Am I misusing the encode function? Is there an example somewhere of this being done?