class_docstr: pytorch nn.Module implementation for gan.network.DoppelGANgerGenerator
code: def _post_process_generated_attribute(
      self, sub_attribute_output, sub_all_attribute_outputs
  ):
      # real attribute post-process
      current_idx = 0
      part_attribute = []
      part_discrete_attribute = []
      from bigdl.nano.utils.common import invalidInputError
  
      for i in range(len(sub_all_attribute_outputs)):
          output = sub_all_attribute_outputs[i]
          if output.type_ == OutputType.DISCRETE:
              sub_output = F.softmax(
                  sub_attribute_output[
                      :, current_idx : current_idx + output.dim
                  ],
                  dim=1,
              )  # batch_size, output.dim
              sub_output_discrete = F.one_hot(
                  torch.argmax(sub_output, dim=1),
                  num_classes=output.dim,
              )
              # batch_size, output.dim, 0/1
          elif output.type_ == OutputType.CONTINUOUS:
              if output.normalization == Normalization.ZERO_ONE:
                  sub_output = torch.sigmoid(
                      sub_attribute_output[
                          :, current_idx : current_idx + output.dim
                      ]
                  )
              elif output.normalization == Normalization.MINUSONE_ONE:
                  sub_output = torch.tanh(
                      sub_attribute_output[
                          :, current_idx : current_idx + output.dim
                      ]
                  )
              else:
                  invalidInputError(False, "unknown normalization type")
              sub_output_discrete = sub_output
          else:
              invalidInputError(False, "unknown output type")
          part_attribute.append(sub_output)
          part_discrete_attribute.append(sub_output_discrete)
          current_idx += output.dim
      invalidInputError(
          current_idx
          == np.sum([t.dim for t in sub_all_attribute_outputs]),
          "current_idx is expected the sum of sub_all_attribute_outputs dim",
      )
      part_attribute = torch.cat(part_attribute, dim=1)
      part_discrete_attribute = torch.cat(
          part_discrete_attribute, dim=1
      )
      part_discrete_attribute = part_discrete_attribute.detach()
      # discrete attribute will be used as other generator's input
      invalidInputError(
          part_attribute.ndim == 2,
          "part_attribute dim expected to be 2",
      )
      invalidInputError(
          part_discrete_attribute.ndim == 2,
          "part_discrete_attribute dim expected to be 2",
      )
      return part_attribute, part_discrete_attribute
  
imports: import torch
  from torch import nn
  import torch.nn.functional
  import numpy
  from enum import Enum
  from .op import linear, flatten
  from .output import OutputType, Normalization
label_desc: Use image node_id 2 for calling the DoppelGANgerGenerator obj's underlying member method code with example usage: obj._post_process_generated_attribute(sub_attribute_output, sub_all_attribute_outputs) and returns: part_attribute,  part_discrete_attribute