class_docstr: Interface for tensorflow models.
docstr: Returns model with last layer adjusted accordingly to softmax argument.
  If the original model has softmax activation in the last layer and softmax=false,
  the softmax activation is removed.
docstr_tok: ["Returns","model","with","last","layer","adjusted","accordingly","to","softmax","argument",".","If","the","original","model","has","softmax","activation","in","the","last","layer","and","softmax=false",",","the","softmax","activation","is","removed","."]
code: def get_softmax_arg_model(self) -> Model:
      """
      Returns model with last layer adjusted accordingly to softmax argument.
      If the original model has softmax activation in the last layer and softmax=false,
      the softmax activation is removed.
      """
  
      if self.softmax:
          return self._get_model_with_softmax_top()
  
      # In this case model has a softmax on top, and we want linear.
      # We have to rebuild the model and replace top with linear activation.
      return self._get_model_with_linear_top()
  
imports: from __future__ import annotations
  from typing import Dict, Optional, Tuple, List, Union, Generator
  from keras.layers import Dense
  from keras import activations
  from keras import Model
  from keras.models import clone_model
  import numpy
  import tensorflow
  from warnings import warn
  from cachetools import cachedmethod, LRUCache
  import operator
  from quantus.helpers.model.model_interface import ModelInterface
  from quantus.helpers import utils
label_desc: Use image node_id 6 for calling the TensorFlowModel obj's underlying member method code with example usage: obj.get_softmax_arg_model() and returns: self, self