h triplet.</span>

<span class="sd">        Parameters:</span>
<span class="sd">            graph (Graph): fact graph</span>
<span class="sd">            h_index (Tensor): indexes of head entities</span>
<span class="sd">            t_index (Tensor): indexes of tail entities</span>
<span class="sd">            r_index (Tensor): indexes of relations</span>
<span class="sd">            all_loss (Tensor, optional): if specified, add loss to this tensor</span>
<span class="sd">            metric (dict, optional