Closed Meryl-Fang closed 3 years ago
What's your pytorch version? The code of float 16 should be ok for pytorch >= 1.4.
What's your pytorch version? The code of float 16 should be ok for pytorch >= 1.4.
pytorch 1.8
Emmm...
Maybe pytorch 1.4 is OK.
Emmm...
Maybe pytorch 1.4 is OK.
Okay, will try that and let you know, thank you!!
Hi! Thank you for sharing this great repo! I was using it to infer on my own data, and when turning float16=True, I got the following error
Ref Frame: 00001.jpg, Time: 4.778830528259277 Traceback (most recent call last): File "tools/eval_net.py", line 65, in <module> main() File "tools/eval_net.py", line 62, in main evaluator.evaluating() File "./networks/engine/eval_manager.py", line 189, in evaluating all_pred, current_embedding = self.model.forward_for_eval(ref_emb, ref_m, prev_emb, prev_m, current_img, gt_ids=obj_num, pred_size=[ori_height,ori_width]) File "./networks/cfbi/cfbi.py", line 93, in forward_for_eval tf_board=False) File "./networks/cfbi/cfbi.py", line 184, in before_seghead_process use_float16=cfg.MODEL_FLOAT16_MATCHING) File "./networks/layers/matching.py", line 305, in global_matching_for_eval reference_embeddings_flat, query_embeddings_flat, reference_labels_flat, n_chunks) File "./networks/layers/matching.py", line 107, in _nearest_neighbor_features_per_object_in_chunks ref_square = reference_embeddings_flat.pow(2).sum(1) RuntimeError: "pow" not implemented for 'Half'
I wonder if there's a solution to this, or should I use some mix-precision package. Thank you very much for your help!