class_docstr: GroupLasso Regularizer:
  The first dimension represents the input layer and the second dimension represents the output layer.
  The groups are defined by the column in the matrix W
class_docstr_tok: ["GroupLasso","Regularizer",":","The","first","dimension","represents","the","input","layer","and","the","second","dimension","represents","the","output","layer",".","The","groups","are","defined","by","the","column","in","the","matrix","W"]
code: def __grouplasso_reg(groups, dim):
      if dim == -1:
          # We only have single group
          return groups.norm(2)
      return groups.norm(2, dim=dim).sum()
  
imports: from enum import Enum
label_desc: Use image node_id 4 for calling the GroupLassoRegularizer obj's underlying member method code with example usage: obj.__grouplasso_reg(groups, dim) and returns: groups, groups