        if params['gan_critic_class_layers'] > 0: # split upper layers for internal classifier only
            class_enc_params = params.copy()
            class_enc_params['num_layers'] = params['gan_critic_class_layers']
            self.class_encoder = TransformerEncoder(class_enc_params)
        else:
            self.class_encoder = None
        if params['gan_critic_critic_layers'] > 0: # split upper layers for critic part only when used with internal classifier