运行错误
(mask_rcnn_tf2) bim@bim-PowerEdge-R730:~/tensorflow_project$ (mask_rcnn_tf2) bim@bim-PowerEdge-R730:~/tensorflow_project$ (mask_rcnn_tf2) bim@bim-PowerEdge-R730:~/tensorflow_project$ (mask_rcnn_tf2) bim@bim-PowerEdge-R730:~/tensorflow_project$ (mask_rcnn_tf2) bim@bim-PowerEdge-R730:~/tensorflow_project$ python csc_2022051701.py train --dataset=/home/bim/project/object_detection/DatasetV3 --model 2022-05-18 00:48:43.532565: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudart.so.11.0 Command: train Model: /home/bim/project/object_detection/DatasetV3/mask_rcnn_coco.h5 Dataset: /home/bim/project/object_detection/DatasetV3 Year: 2014 Logs: /home/bim/tensorflow_project/D:\object_detection\DatasetV3/logs Auto Download: False Configurations: BACKBONE resnet101 BACKBONE_STRIDES [4, 8, 16, 32, 64] BATCH_SIZE 1 BBOX_STD_DEV [0.1 0.1 0.2 0.2] COMPUTE_BACKBONE_SHAPE None DETECTION_MAX_INSTANCES 100 DETECTION_MIN_CONFIDENCE 0.7 DETECTION_NMS_THRESHOLD 0.3 FPN_CLASSIF_FC_LAYERS_SIZE 1024 GPU_COUNT 1 GRADIENT_CLIP_NORM 5.0 IMAGES_PER_GPU 1 IMAGE_CHANNEL_COUNT 3 IMAGE_MAX_DIM 1024 IMAGE_META_SIZE 14 IMAGE_MIN_DIM 800 IMAGE_MIN_SCALE 0 IMAGE_RESIZE_MODE square IMAGE_SHAPE [1024 1024 3] LEARNING_MOMENTUM 0.9 LEARNING_RATE 0.001 LOSS_WEIGHTS {'rpn_class_loss': 1.0, 'rpn_bbox_loss': 1.0, 'mrcnn_class_loss': 1.0, 'mrcnn_bbox_loss': 1.0, 'mrcnn_mask_loss': 1.0} MASK_POOL_SIZE 14 MASK_SHAPE [28, 28] MAX_GT_INSTANCES 100 MEAN_PIXEL [123.7 116.8 103.9] MINI_MASK_SHAPE (56, 56) NAME coco NUM_CLASSES 2 POOL_SIZE 7 POST_NMS_ROIS_INFERENCE 1000 POST_NMS_ROIS_TRAINING 2000 PRE_NMS_LIMIT 6000 ROI_POSITIVE_RATIO 0.33 RPN_ANCHOR_RATIOS [0.5, 1, 2] RPN_ANCHOR_SCALES (32, 64, 128, 256, 512) RPN_ANCHOR_STRIDE 1 RPN_BBOX_STD_DEV [0.1 0.1 0.2 0.2] RPN_NMS_THRESHOLD 0.7 RPN_TRAIN_ANCHORS_PER_IMAGE 256 STEPS_PER_EPOCH 1000 TOP_DOWN_PYRAMID_SIZE 256 TRAIN_BN False TRAIN_ROIS_PER_IMAGE 200 USE_MINI_MASK True USE_RPN_ROIS True VALIDATION_STEPS 50 WEIGHT_DECAY 0.0001 Traceback (most recent call last): File "csc_2022051701.py", line 456, in <module> model = modellib.MaskRCNN(mode="training", config=config,model_dir=args.logs) File "/home/bim/tensorflow_project/mrcnn/model.py", line 1837, in __init__ self.keras_model = self.build(mode=mode, config=config) File "/home/bim/tensorflow_project/mrcnn/model.py", line 1876, in build x, K.shape(input_image)[1:3]))(input_gt_boxes) File "/home/bim/anaconda3/envs/mask_rcnn_tf2/lib/python3.7/site-packages/tensorflow/python/keras/engine/base_layer.py", line 952, in __call__ input_list) File "/home/bim/anaconda3/envs/mask_rcnn_tf2/lib/python3.7/site-packages/tensorflow/python/keras/engine/base_layer.py", line 1091, in _functional_constr inputs, input_masks, args, kwargs) File "/home/bim/anaconda3/envs/mask_rcnn_tf2/lib/python3.7/site-packages/tensorflow/python/keras/engine/base_layer.py", line 822, in _keras_tensor_symbo return self._infer_output_signature(inputs, args, kwargs, input_masks) File "/home/bim/anaconda3/envs/mask_rcnn_tf2/lib/python3.7/site-packages/tensorflow/python/keras/engine/base_layer.py", line 869, in _infer_output_signa keras_tensor.keras_tensor_from_tensor, outputs) File "/home/bim/anaconda3/envs/mask_rcnn_tf2/lib/python3.7/site-packages/tensorflow/python/util/nest.py", line 659, in map_structure structure[0], [func(*x) for x in entries], File "/home/bim/anaconda3/envs/mask_rcnn_tf2/lib/python3.7/site-packages/tensorflow/python/util/nest.py", line 659, in <listcomp> structure[0], [func(*x) for x in entries], File "/home/bim/anaconda3/envs/mask_rcnn_tf2/lib/python3.7/site-packages/tensorflow/python/keras/engine/keras_tensor.py", line 606, in keras_tensor_from out = keras_tensor_cls.from_tensor(tensor) File "/home/bim/anaconda3/envs/mask_rcnn_tf2/lib/python3.7/site-packages/tensorflow/python/keras/engine/keras_tensor.py", line 205, in from_tensor type_spec = type_spec_module.type_spec_from_value(tensor) File "/home/bim/anaconda3/envs/mask_rcnn_tf2/lib/python3.7/site-packages/tensorflow/python/framework/type_spec.py", line 554, in type_spec_from_value (value, type(value).__name__)) TypeError: Could not build a TypeSpec for <KerasTensor: shape=(None, None, 4) dtype=float32 (created by layer 'tf.math.truediv')> with type KerasTensor (mask_rcnn_tf2) bim@bim-PowerEdge-R730:~/tensorflow_project$ (mask_rcnn_tf2) bim@bim-PowerEdge-R730:~/tensorflow_project$ (mask_rcnn_tf2) bim@bim-PowerEdge-R730:~/tensorflow_project$ (mask_rcnn_tf2) bim@bim-PowerEdge-R730:~/tensorflow_project$ (mask_rcnn_tf2) bim@bim-PowerEdge-R730:~/tensorflow_project$
#######################