class_docstr: A base abstract class for generators
class_docstr_tok: ["A","base","abstract","class","for","generators"]
docstr: Lets the generator sample random samples.
  Output is either a single sample or, if provided,
  a batch of samples of size "batch_size"
  
  :param batch_size: Number of samples to generate
  :param condition: Possible condition for a condotional generator
                    (e.g. a class label)
docstr_tok: ["Lets","the","generator","sample","random","samples",".","Output","is","either","a","single","sample","or",",","if","provided",",","a","batch","of","samples","of","size","``","batch_size","''",":","param","batch_size",":","Number","of","samples","to","generate",":","param","condition",":","Possible","condition","for","a","condotional","generator","(","e.g",".","a","class","label",")"]
code: def generate(self, batch_size=None, condition=None):
      """
      Lets the generator sample random samples.
      Output is either a single sample or, if provided,
      a batch of samples of size "batch_size"
  
      :param batch_size: Number of samples to generate
      :param condition: Possible condition for a condotional generator
                        (e.g. a class label)
      """
  
imports: from abc import abstractmethod
  from typing import Union
  from matplotlib import transforms
  import torch
  import torch.nn
  from torchvision import transforms
  from avalanche.models.utils import MLP, Flatten
  from avalanche.models.base_model import BaseModel
label_desc: Use image node_id 1 for calling the Generator obj's underlying member method code with example usage: obj.generate(batch_size, condition) without return types