(self, optimizer, loss)
return optimizer.compute_gradients(loss)
:param optimizer:
        :param loss:
        :return:

        return vars and grads that not be fixed
def get_gradients(self, optimizer, loss):
        '''

        :param optimizer:
        :param loss:
        :return:

        return vars and grads that not be fixed
        '''

        # if cfgs.FIXED_BLOCKS > 0:
        #     trainable_vars = tf.trainable_variables()
        #     # trained_vars = slim.get_trainable_variables()
        #     start_names = [cfgs.NET_NAME + '/block%d'%i for i in range(1, cfgs.FIXED_BLOCKS+1)] + \
        #                   [cfgs.NET_NAME + '/conv1']
        #     start_names = tuple(start_names)
        #     trained_var_list = []
        #     for var in trainable_vars:
        #         if not var.name.startswith(start_names):
        #             trained_var_list.append(var)
        #     # slim.learning.train()
        #     grads = optimizer.compute_gradients(loss, var_list=trained_var_list)
        #     return grads
        # else:
        #     return optimizer.compute_gradients(loss)
        return optimizer.compute_gradients(loss)
def get_gradients ( self , optimizer , loss ) : # if cfgs.FIXED_BLOCKS > 0: #     trainable_vars = tf.trainable_variables() #     # trained_vars = slim.get_trainable_variables() #     start_names = [cfgs.NET_NAME + '/block%d'%i for i in range(1, cfgs.FIXED_BLOCKS+1)] + \ #                   [cfgs.NET_NAME + '/conv1'] #     start_names = tuple(start_names) #     trained_var_list = [] #     for var in trainable_vars: #         if not var.name.startswith(start_names): #             trained_var_list.append(var) #     # slim.learning.train() #     grads = optimizer.compute_gradients(loss, var_list=trained_var_list) #     return grads # else: #     return optimizer.compute_gradients(loss) return optimizer . compute_gradients ( loss )