import tensorflow as tf

            # session.run(update_target_fn)
            # you should update every target_update_freq steps, and you may find the
            # variable num_param_updates useful for this (it was initialized to 0)

            obs_t_batch,act_t_batch,rew_t_batch,obs_tp1_batch,done_mask_batch = replay_buffer.sample(batch_size)
            if not model_initialized:
                initialize_interdependent_variables(session,tf.global_variables(),
                                                    {obs_t_ph: obs_t_batch,obs_tp1_ph: obs_tp1_batch,})
                model_initialized = True
            session.run([total_error,train_fn],
                        feed_dict={obs_t_ph: obs_t_batch,act_t_ph: act_t_batch, rew_t_ph: rew_t_batch,
                                   obs_tp1_ph: obs_tp1_batch,done_mask_ph: done_mask_batch,
