code: public SDVariable cosineSimilarity(String name, SDVariable x, SDVariable y, int... dimensions) {
          validateNumerical("cosine similarity", x, y);
          SDVariable cosim = f().cosineSimilarity(x, y, dimensions);
          return updateVariableNameAndReference(cosim, name);
      }
docs: Cosine similarity pairwise reduction operation. The output contains the cosine similarity for each tensor/subset
  along the specified dimensions:<br>
  out = (sum_i x[i] * y[i]) / ( sqrt(sum_i x[i]^2) * sqrt(sum_i y[i]^2)
  
  @param x          Input variable x
  @param y          Input variable y
  @param dimensions Dimensions to calculate cosine similarity over
  @return Output variable