class_docstr: Flatten layer (specification key: `flatten`).
  
  Args:
      name (string): Layer name
          (<span style="color:#00C000"><b>default</b></span>: internally chosen).
      input_spec (specification): <span style="color:#00C000"><b>internal use</b></span>.
class_docstr_tok: ["Flatten","layer","(","specification","key",":","`","flatten","`",")",".","Args",":","name","(","string",")",":","Layer","name","(","<","span","style=","''","color",":","#","00C000","''",">","<","b",">","default","<","\/b",">","<","\/span",">",":","internally","chosen",")",".","input_spec","(","specification",")",":","<","span","style=","''","color",":","#","00C000","''",">","<","b",">","internal","use","<","\/b",">","<","\/span",">","."]
code: def apply(self, *, x):
      if self.input_spec.shape == ():
          return tf.expand_dims(input=x, axis=1)
  
      else:
          return super().apply(x=x)
  
imports: import numpy
  import tensorflow
  from tensorforce import TensorforceError
  from tensorforce.core import TensorSpec, tf_function, tf_util
  from tensorforce.core.layers import Layer
label_desc: Use image node_id 2 for calling the Flatten obj's underlying member method code with example usage: obj.apply() and returns: tf, super