I believe relative code can be found here:

  
      github.com
  
  
    pytorch/pytorch/blob/8678e8584fc444d62146561cfc662a624c50c641/aten/src/THNN/generic/MultiLabelMarginCriterion.c 47
#ifndef TH_GENERIC_FILE
#define TH_GENERIC_FILE "generic/MultiLabelMarginCriterion.c"
#else

// TODO: improve error messages
void THNN_(MultiLabelMarginCriterion_updateOutput)(
          THNNState *state,
          THTensor *input,
          THIndexTensor *target,
          THTensor *output,
          THTensor *isTarget,
          bool sizeAverage,
          bool reduce)
{
  real *input_data, *isTarget_data;
  THIndex_t *target_data;
  int64_t nframe, dim;
  int64_t t, d, dt, ddt;
  real sum;



  This file has been truncated. show original

  
  
    
    
  
  


Very confusing indeed, Don’t see why y and x must have the same size, might be for parallellism.
I’m looking into, might come back to you if I find something meaningful.