megvii-research / BasesHomo

The official PyTorch implementation of the paper "Motion Basis Learning for Unsupervised Deep Homography Estimation with Subspace Projection".
63 stars 10 forks source link

Loss does not fall #1

Open AuroraYXL opened 2 years ago

AuroraYXL commented 2 years ago

I have two questions:

  1. When training with multiple GPUs, it seems that self.genbasis cannot be copied to all GPUs.
  2. My loss only decreased in the first 5K iterations, and then there was almost no change. My training parameters are exactly the same as the paper.
MingboHong commented 2 years ago

H_flow_f = (self.basis weight_f).sum(1).reshape(batch_size, 2, h_patch, w_patch) -----> H_flow_f = (self.basis.to(weight_f.device) weight_f).sum(1).reshape(batch_size, 2, h_patch, w_patch) H_flow_b = (self.basis weight_b).sum(1).reshape(batch_size, 2, h_patch, w_patch) -----> H_flow_b = (self.basis.to(weight_b.device) weight_b).sum(1).reshape(batch_size, 2, h_patch, w_patch)

can fix 1st bug.

AuroraYXL commented 2 years ago

How to solve the second problem? Without changing any code and parameters, my loss will not decline after the first 5k iterations (single GPU operation).p1 is feature loss,p2 is total loss feature total

TimLeeCV commented 7 months ago

Hi! @AuroraYXL. I am sorry for disturbing you. I have the same problem as you. My loss only decreased in the first 5K iterations, and then there was almost no change. Have you solved this problem? Look forward to your reply!