Scalsol / mega.pytorch

Memory Enhanced Global-Local Aggregation for Video Object Detection, CVPR2020
Other
565 stars 115 forks source link

Adding another branch to simulate flownet?But fail could U take a look? #25

Closed TyroneLi closed 4 years ago

TyroneLi commented 4 years ago

Hi, I want to use a seperate branch to learn the knowledge of flownet. So I added another branch and took the added_branch output and flownet output to compute MSE Loss. Here is my implementation: Notice : to avoid mse loss BP to flownet, I use detach() function to cut gradient bp. generator_mse_loss = torch.nn.MSELoss() generator_loss = generator_mse_loss(flow.detach(), generator_flow) ...... losses.update({"generator_loss":(generator_loss)}) ...... And the other part remain the same as DFF training config. I think mse loss shuold not backpropagate to flownet part. After training, I could not get the same result as DFF using detection faster rcnn and flownet.That's really confused. Did u meet thing like this before? Thanks~

Scalsol commented 4 years ago

I haven't try this before. The only thing I could suggest you could try to calculate the difference between the flow prediction results provided by flownet and your branch to see whether your branch learn the knowledge from flownet well. You could first take a look at the loss, if the loss is reasonable, then you could calculate the MSE error on the training dataset and validation dataset to see whether overfitting occurs.

Hope this helps.