diff --git a/official/cv/faster_rcnn/default_config.yaml b/official/cv/faster_rcnn/default_config.yaml index 0ed7dcee5becb8a4dc2dbfb16c01c2b8a668a4fc..5dbf06505d2ad5b318a477529db4570d074a49e0 100644 --- a/official/cv/faster_rcnn/default_config.yaml +++ b/official/cv/faster_rcnn/default_config.yaml @@ -161,7 +161,6 @@ anno_path: '' backbone: 'resnet_v1.5_50' # eval.py FasterRcnn evaluation -ann_file: '/cache/data/annotations/instances_val2017.json' checkpoint_path: "/cache/train/fasterrcnn/faster_rcnn-12_7393.ckpt" # export.py fasterrcnn_export @@ -170,7 +169,6 @@ file_format: "MINDIR" ckpt_file: "/cache/train/fasterrcnn/faster_rcnn-12_7393.ckpt" # postprocess ("./src/config_50.yaml") -#ann_file: '' result_path: '' --- @@ -199,7 +197,6 @@ device_id: 'Device id, default is 0.' device_num: 'Use device nums, default is 1.' rank_id: 'Rank id, default is 0.' file_format: 'file format' -ann_file: "Ann file, default is val.json." checkpoint_path: "Checkpoint file path." ckpt_file: 'fasterrcnn ckpt file.' result_path: "result file path." diff --git a/official/cv/faster_rcnn/default_config_101.yaml b/official/cv/faster_rcnn/default_config_101.yaml index e6ef0dffedcc27453eddf3bc91633d79c1c6c129..b78c35df9124c991db0c4d45919afe33c6030b8c 100644 --- a/official/cv/faster_rcnn/default_config_101.yaml +++ b/official/cv/faster_rcnn/default_config_101.yaml @@ -162,7 +162,6 @@ anno_path: '' backbone: 'resnet_v1_101' # eval.py FasterRcnn evaluation -ann_file: '/cache/data/annotations/instances_val2017.json' checkpoint_path: "/cache/train/fasterrcnn/faster_rcnn-12_7393.ckpt" # export.py fasterrcnn_export @@ -171,7 +170,6 @@ file_format: "MINDIR" ckpt_file: "/cache/train/fasterrcnn/faster_rcnn-12_7393.ckpt" # postprocess ("./src/config_50.yaml") -#ann_file: '' result_path: '' --- @@ -200,7 +198,6 @@ device_id: 'Device id, default is 0.' device_num: 'Use device nums, default is 1.' rank_id: 'Rank id, default is 0.' file_format: 'file format' -ann_file: "Ann file, default is val.json." checkpoint_path: "Checkpoint file path." ckpt_file: 'fasterrcnn ckpt file.' result_path: "result file path." diff --git a/official/cv/faster_rcnn/default_config_152.yaml b/official/cv/faster_rcnn/default_config_152.yaml index 78fa68afccf0507d3a0fecf7378049060f7af5fe..5b1f32875480003bd307d3226445e6361c94f10e 100644 --- a/official/cv/faster_rcnn/default_config_152.yaml +++ b/official/cv/faster_rcnn/default_config_152.yaml @@ -162,7 +162,6 @@ anno_path: '' backbone: 'resnet_v1_152' # eval.py FasterRcnn evaluation -ann_file: '/cache/data/annotations/instances_val2017.json' checkpoint_path: "/cache/train/fasterrcnn/faster_rcnn-12_7393.ckpt" # export.py fasterrcnn_export @@ -171,7 +170,6 @@ file_format: "MINDIR" ckpt_file: "/cache/train/fasterrcnn/faster_rcnn-12_7393.ckpt" # postprocess ("./src/config_50.yaml") -#ann_file: '' result_path: '' --- @@ -200,7 +198,6 @@ device_id: 'Device id, default is 0.' device_num: 'Use device nums, default is 1.' rank_id: 'Rank id, default is 0.' file_format: 'file format' -ann_file: "Ann file, default is val.json." checkpoint_path: "Checkpoint file path." ckpt_file: 'fasterrcnn ckpt file.' result_path: "result file path." diff --git a/official/cv/faster_rcnn/default_config_InceptionResnetV2.yaml b/official/cv/faster_rcnn/default_config_InceptionResnetV2.yaml index 0c799d3ca0777b382f7ce1788b5178f621838f94..205739dd2ef1d6562866bd1d4226b604702e6a8f 100644 --- a/official/cv/faster_rcnn/default_config_InceptionResnetV2.yaml +++ b/official/cv/faster_rcnn/default_config_InceptionResnetV2.yaml @@ -160,7 +160,6 @@ anno_path: '' backbone: 'inception_resnet_v2' # eval.py FasterRcnn evaluation -ann_file: '/cache/data/annotations/instances_val2017.json' checkpoint_path: "/cache/checkpoint_path/faster_rcnn-20_7393.ckpt" # export.py fasterrcnn_export @@ -169,7 +168,6 @@ file_format: "MINDIR" ckpt_file: "" # postprocess ("./src/default_config_InceptionResnetV2.yaml") -#ann_file: '' result_path: '' --- @@ -198,7 +196,6 @@ device_id: 'Device id, default is 0.' device_num: 'Use device nums, default is 1.' rank_id: 'Rank id, default is 0.' file_format: 'file format' -ann_file: "Ann file, default is val.json." checkpoint_path: "Checkpoint file path." ckpt_file: 'fasterrcnn ckpt file.' result_path: "result file path." diff --git a/official/cv/faster_rcnn/postprocess.py b/official/cv/faster_rcnn/postprocess.py index db9bcd4e97012ac22582e20400d691810568dcb3..db9d2d0fb4591b7fa6f87533cb83a6d0afb31444 100644 --- a/official/cv/faster_rcnn/postprocess.py +++ b/official/cv/faster_rcnn/postprocess.py @@ -31,14 +31,14 @@ def modelarts_pre_process(): @moxing_wrapper(pre_process=modelarts_pre_process) -def get_eval_result(ann_file, result_path): +def get_eval_result(anno_path, result_path): """ get evaluation result of faster rcnn""" max_num = 128 result_path = result_path outputs = [] - dataset_coco = COCO(ann_file) + dataset_coco = COCO(anno_path) img_ids = dataset_coco.getImgIds() for img_id in img_ids: @@ -74,4 +74,4 @@ def get_eval_result(ann_file, result_path): if __name__ == '__main__': - get_eval_result(config.ann_file, config.result_path) + get_eval_result(config.anno_path, config.result_path) diff --git a/official/gnn/bgcf/train.py b/official/gnn/bgcf/train.py index 4726bb774f6b0c91efabbcd1a972248c9569f882..bd80b33960fa41bc823647c0e57cbd363b7ebb1a 100644 --- a/official/gnn/bgcf/train.py +++ b/official/gnn/bgcf/train.py @@ -168,9 +168,8 @@ def run_train(): neg_gnew_neighs) if iter_num == num_iter: - print('Epoch', '%03d' % _epoch, 'iter', '%02d' % iter_num, - 'loss', - '{}, cost:{:.4f}'.format(train_loss, time.time() - epoch_start)) + print('Epoch: {}, iter: {}, loss: {}, epoch time: {:.4f}, per step time: {:.4f}'.format( + _epoch, iter_num, train_loss, time.time() - epoch_start, (time.time()-epoch_start) / num_iter)) iter_num += 1 if _epoch % config.eval_interval == 0: