docstr: Calculate the shape of the input that should be expected by the model
  
  Parameters
  ----------
  get_dim: Boolean, default=False
      If True, instead of returning an input_shape tuple, an input_dim scalar will be returned
  
  Returns
  -------
  Tuple, or scalar
      If get_dim=False, an input_shape tuple. Else, an input_dim scalar
docstr_tok: ["Calculate","the","shape","of","the","input","that","should","be","expected","by","the","model","Parameters","--","--","--","--","--","get_dim",":","Boolean",",","default=False","If","True",",","instead","of","returning","an","input_shape","tuple",",","an","input_dim","scalar","will","be","returned","Returns","--","--","--","-","Tuple",",","or","scalar","If","get_dim=False",",","an","input_shape","tuple",".","Else",",","an","input_dim","scalar"]
code: def get_input_shape(self, get_dim=False):
      """Calculate the shape of the input that should be expected by the model
  
      Parameters
      ----------
      get_dim: Boolean, default=False
          If True, instead of returning an input_shape tuple, an input_dim scalar will be returned
  
      Returns
      -------
      Tuple, or scalar
          If get_dim=False, an input_shape tuple. Else, an input_dim scalar
      """
      if self.train_input is not None:
          if get_dim:
              return self.train_input.shape[1]
          return self.train_input.shape[1:]
      elif self.validation_input is not None:
          if get_dim:
              return self.validation_input.shape[1]
          return self.validation_input.shape[1:]
      else:
          raise ValueError(
              "Need train_input data, or input_dim to initialize `KerasModel`"
          )
  
imports: from hyperparameter_hunter.sentinels import locate_sentinels
  from hyperparameter_hunter.settings import G
  from contextlib import suppress
  import inspect
  import sys
  import warnings
  import sklearn.utils
label_desc: Use image node_id 4 for calling the KerasModel obj's underlying member method code with example usage: obj.get_input_shape(get_dim) and returns: self, self, self, self