docstr: Set the parameters from a flat vector
  
  :param var_list: ([TensorFlow Tensor]) the variables
  :param dtype: (type) the type for the placeholder
  :param sess: (TensorFlow Session)
code: def __init__(self, var_list, dtype=tf.float32, sess=None):
      """
      Set the parameters from a flat vector
  
      :param var_list: ([TensorFlow Tensor]) the variables
      :param dtype: (type) the type for the placeholder
      :param sess: (TensorFlow Session)
      """
      shapes = list(map(var_shape, var_list))
      total_size = np.sum([intprod(shape) for shape in shapes])
  
      self.theta = theta = tf.placeholder(dtype, [total_size])
      start = 0
      assigns = []
      for shape, _var in zip(shapes, var_list):
          size = intprod(shape)
          assigns.append(
              tf.assign(
                  _var, tf.reshape(theta[start : start + size], shape)
              )
          )
          start += size
      self.operation = tf.group(*assigns)
      self.sess = sess
  
imports: import os
  import collections
  import functools
  import multiprocessing
  from typing import Set
  import numpy
  import tensorflow
label_desc: Use image node_id 1 to create a new SetFromFlat object from inherited base classes: object with example: obj = SetFromFlat(var_list, dtype, sess)