import tensorflow as tf

            optimizer = tf.train.MomentumOptimizer(lr, momentum=cfgs.MOMENTUM)
            r3det_gwd = build_whole_network.DetectionNetworkR3DetGWD(cfgs=self.cfgs,
                                                                     is_training=True)

            with tf.name_scope('get_batch'):
                if cfgs.IMAGE_PYRAMID:
                    shortside_len_list = tf.constant(cfgs.IMG_SHORT_SIDE_LEN)
                    shortside_len = tf.random_shuffle(shortside_len_list)[0]

                else:
                    shortside_len = cfgs.IMG_SHORT_SIDE_LEN

