-
Notifications
You must be signed in to change notification settings - Fork 46
Description
I'm getting the following error during training
ValueError: Error when checking input: expected input_image_meta to have shape (14,) but got array with shape (17,)
Starting at epoch 0. LR=0.001
Checkpoint Path: ../aktwelve_Mask_RCNN\logs\cig_butts20200910T2032\mask_rcnn_cig_butts_{epoch:04d}.h5
Selecting layers to train
fpn_c5p5 (Conv2D)
fpn_c4p4 (Conv2D)
fpn_c3p3 (Conv2D)
fpn_c2p2 (Conv2D)
fpn_p5 (Conv2D)
fpn_p2 (Conv2D)
fpn_p3 (Conv2D)
fpn_p4 (Conv2D)
rpn_model (Functional)
mrcnn_mask_conv1 (TimeDistributed)
mrcnn_mask_bn1 (TimeDistributed)
mrcnn_mask_conv2 (TimeDistributed)
mrcnn_mask_bn2 (TimeDistributed)
mrcnn_class_conv1 (TimeDistributed)
mrcnn_class_bn1 (TimeDistributed)
mrcnn_mask_conv3 (TimeDistributed)
mrcnn_mask_bn3 (TimeDistributed)
mrcnn_class_conv2 (TimeDistributed)
mrcnn_class_bn2 (TimeDistributed)
mrcnn_mask_conv4 (TimeDistributed)
mrcnn_mask_bn4 (TimeDistributed)
mrcnn_bbox_fc (TimeDistributed)
mrcnn_mask_deconv (TimeDistributed)
mrcnn_class_logits (TimeDistributed)
mrcnn_mask (TimeDistributed)
Epoch 1/4
c:\users\owner\appdata\local\programs\python\python36\lib\site-packages\skimage\transform_warps.py:830: FutureWarning: Input image dtype is bool. Interpolation is not defined with bool data type. Please set order to 0 or explicitely cast input image to another data type. Starting from version 0.19 a ValueError will be raised instead of this warning.
order = _validate_interpolation_order(image.dtype, order)
ValueError Traceback (most recent call last)
in
8 learning_rate=config.LEARNING_RATE,
9 epochs=4,
---> 10 layers='heads')
11 end_train = time.time()
12 minutes = round((end_train - start_train) / 60, 2)
~\Desktop\tutorials-masterr\aktwelve_Mask_RCNN\mrcnn\model.py in train(self, train_dataset, val_dataset, learning_rate, epochs, layers, augmentation, custom_callbacks, no_augmentation_sources)
2365 max_queue_size=100,
2366 workers=workers,
-> 2367 use_multiprocessing=workers > 1,
2368 )
2369 self.epoch = max(self.epoch, epochs)
c:\users\owner\appdata\local\programs\python\python36\lib\site-packages\tensorflow\python\keras\engine\training_v1.py in fit(self, x, y, batch_size, epochs, verbose, callbacks, validation_split, validation_data, shuffle, class_weight, sample_weight, initial_epoch, steps_per_epoch, validation_steps, validation_freq, max_queue_size, workers, use_multiprocessing, **kwargs)
807 max_queue_size=max_queue_size,
808 workers=workers,
--> 809 use_multiprocessing=use_multiprocessing)
810
811 def evaluate(self,
c:\users\owner\appdata\local\programs\python\python36\lib\site-packages\tensorflow\python\keras\engine\training_generator.py in fit(self, model, x, y, batch_size, epochs, verbose, callbacks, validation_split, validation_data, shuffle, class_weight, sample_weight, initial_epoch, steps_per_epoch, validation_steps, validation_freq, max_queue_size, workers, use_multiprocessing)
588 shuffle=shuffle,
589 initial_epoch=initial_epoch,
--> 590 steps_name='steps_per_epoch')
591
592 def evaluate(self,
c:\users\owner\appdata\local\programs\python\python36\lib\site-packages\tensorflow\python\keras\engine\training_generator.py in model_iteration(model, data, steps_per_epoch, epochs, verbose, callbacks, validation_data, validation_steps, validation_freq, class_weight, max_queue_size, workers, use_multiprocessing, shuffle, initial_epoch, mode, batch_size, steps_name, **kwargs)
254
255 is_deferred = not model._is_compiled
--> 256 batch_outs = batch_function(*batch_data)
257 if not isinstance(batch_outs, list):
258 batch_outs = [batch_outs]
c:\users\owner\appdata\local\programs\python\python36\lib\site-packages\tensorflow\python\keras\engine\training_v1.py in train_on_batch(self, x, y, sample_weight, class_weight, reset_metrics)
1062 x, y, sample_weights = self._standardize_user_data(
1063 x, y, sample_weight=sample_weight, class_weight=class_weight,
-> 1064 extract_tensors_from_dataset=True)
1065
1066 # If self._distribution_strategy is True, then we are in a replica context
c:\users\owner\appdata\local\programs\python\python36\lib\site-packages\tensorflow\python\keras\engine\training_v1.py in _standardize_user_data(self, x, y, sample_weight, class_weight, batch_size, check_steps, steps_name, steps, validation_split, shuffle, extract_tensors_from_dataset)
2332 is_dataset=is_dataset,
2333 class_weight=class_weight,
-> 2334 batch_size=batch_size)
2335
2336 def _standardize_tensors(self, x, y, sample_weight, run_eagerly, dict_inputs,
c:\users\owner\appdata\local\programs\python\python36\lib\site-packages\tensorflow\python\keras\engine\training_v1.py in _standardize_tensors(self, x, y, sample_weight, run_eagerly, dict_inputs, is_dataset, class_weight, batch_size)
2359 feed_input_shapes,
2360 check_batch_axis=False, # Don't enforce the batch size.
-> 2361 exception_prefix='input')
2362
2363 # Get typespecs for the input data and sanitize it if necessary.
c:\users\owner\appdata\local\programs\python\python36\lib\site-packages\tensorflow\python\keras\engine\training_utils.py in standardize_input_data(data, names, shapes, check_batch_axis, exception_prefix)
581 ': expected ' + names[i] + ' to have shape ' +
582 str(shape) + ' but got array with shape ' +
--> 583 str(data_shape))
584 return data
585
ValueError: Error when checking input: expected input_image_meta to have shape (14,) but got array with shape (17,)
Can anyone please tell me how to resolve it?
Thanks