import tensorflow as tf


			# self.imitation_loss   = self.bc_loss    #+ self.next_loc_loss_il

			# Get gradients from local network using local losses and
			# normalize the gradients using clipping
			local_vars         = tf.get_collection(tf.GraphKeys.TRAINABLE_VARIABLES, scope+'/qvalues')
			self.gradients     = tf.gradients(self.loss, local_vars)
			self.var_norms     = tf.global_norm(local_vars)
			grads, self.grad_norms = tf.clip_by_global_norm(self.gradients, GRAD_CLIP)

			# Apply local gradients to global network
			global_vars        = tf.get_collection(tf.GraphKeys.TRAINABLE_VARIABLES, GLOBAL_NET_SCOPE+'/qvalues')
			self.apply_grads   = trainer.apply_gradients(zip(grads, global_vars))

