import tensorflow as tf

  logz.configure_output_dir(logdir)
  # Log experimental parameters
  args = inspect.getargspec(QLearner)[0]
  params = {k: str(locals_[k]) if k in locals_ else None for k in args}
  params['exp_name'] = locals_['q_func'].__name__ + locals_['double_q'] * '_doubleQ'
  logz.save_params(params)

def get_num_params():
    total_parameters = 0
    for variable in tf.trainable_variables():
        
        shape = variable.get_shape()
        variable_parameters = 1
        for dim in shape:
            variable_parameters *= dim.value
        print('%d parameters in %s' %(variable_parameters ,variable.name))
        total_parameters += variable_parameters
    print('Total : %d'  %total_parameters)
