| get_constr_output | R Documentation |
Given neural network outputs x and ancestor matrix R, enforces that
if a class is predicted positive, all its ancestors must also be positive.
Implements: final_out[i] = max{x[j] : R[i,j] = 1}
get_constr_output(x, R)
x |
A |
R |
A |
A torch_tensor of shape (batch_size, n_classes) with constrained outputs.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.