Open shinyke opened 2 years ago
The training logic cannot work cause this exception:
File "...\tensorflow-yolov4-tflite-master\core\dataset.py", line 124, in __next__ self.train_output_sizes[2], IndexError: index 2 is out of bounds for axis 0 with size 2
the source code is:
def __next__(self): with tf.device("/cpu:0"): # self.train_input_size = random.choice(self.train_input_sizes) self.train_input_size = cfg.TRAIN.INPUT_SIZE self.train_output_sizes = self.train_input_size // self.strides # the // operation can only return array with two values batch_image = np.zeros( ( self.batch_size, self.train_input_size, self.train_input_size, 3, ), dtype=np.float32, ) batch_label_sbbox = np.zeros( ( self.batch_size, self.train_output_sizes[0], self.train_output_sizes[0], self.anchor_per_scale, 5 + self.num_classes, ), dtype=np.float32, ) batch_label_mbbox = np.zeros( ( self.batch_size, self.train_output_sizes[1], self.train_output_sizes[1], self.anchor_per_scale, 5 + self.num_classes, ), dtype=np.float32, ) batch_label_lbbox = np.zeros( ( self.batch_size, self.train_output_sizes[2], self.train_output_sizes[2], self.anchor_per_scale, 5 + self.num_classes, ), dtype=np.float32, )
Can you have any idea about it? Or what is the main purpose of the code self.train_output_sizes = self.train_input_size // self.strides
self.train_output_sizes = self.train_input_size // self.strides
same trouble
The training logic cannot work cause this exception:
the source code is:
Can you have any idea about it? Or what is the main purpose of the code
self.train_output_sizes = self.train_input_size // self.strides