Closed liuziyang123 closed 6 years ago
Hi, that test is just meant to exemplify how to use it and to make sure that the dimensions match up. The output is supposed to be rubbish because there is no training, labels/ground-truth or a neural network underneath. If you want to make sure the filters are working correctly please look at the tests for bilateral filtering in the permutohedral lattice repository. If the filters are working then the rest is working. If want to learn how to use this layer in a useful way please check the original paper.
Best,
Miguel
Thank you so much for answering my question. And may I ask another question? Why can't we feed labels to this layer? Is it because that the dimensions will not match up?
The dimensions match up (as long as it is one-hot encoding) and hence you can feed them it is just not correct to do so. In theory of the CRF we deal with log probability (logits) not labels or probability, as a result, the correct procedure is to feed the layer the raw outputs (logits) from the neural network.
I followed your steps and when I run crf_rnn_layer_test.py I got this and this How did this happen?