code: def get_flat(self):
          
          self._check_sess()
          return np.concatenate([
              v.eval(session=self.sess).flatten()
              for v in self.variables.values()
          ])
docs: Gets the weights and returns them as a flat array.
  
          Returns:
              1D Array containing the flattened weights.