Giter Site home page Giter Site logo

Comments (12)

sanghoooon avatar sanghoooon commented on August 25, 2024

Could you provide shapes of feat, feat_recon_pos, feat_recon_neg ?

from lba.

zhuchuanleiqq avatar zhuchuanleiqq commented on August 25, 2024

this three is all [64, 1024, 18, 9],i also print the shape of self.criterion(feat, feat_recon_pos, feat_recon_neg),it is [64, 1024, 18],the last dimension is disappear,i think the reason is the setting of the nn.TripletMarginLoss(margin=0.3, p=2.0, reduce=False),also,i print the shape of comask_pos,it is [64, 1, 18, 9]

from lba.

sanghoooon avatar sanghoooon commented on August 25, 2024

Could you specify your pytorch version?

from lba.

zhuchuanleiqq avatar zhuchuanleiqq commented on August 25, 2024

python 3.7

from lba.

sanghoooon avatar sanghoooon commented on August 25, 2024

PyTorch version?

from lba.

zhuchuanleiqq avatar zhuchuanleiqq commented on August 25, 2024

pytorch 1.10.1

from lba.

sanghoooon avatar sanghoooon commented on August 25, 2024

Please check out the README.md file: our implementation is based on PyTorch 1.7.1
The behaviour within nn.TripletMarginLoss may differ across PyTorch versions.
You might want to reshape tensors prior to passing them through nn.TripletMarginLoss.

from lba.

zhuchuanleiqq avatar zhuchuanleiqq commented on August 25, 2024

ok ,thank you for your help,may i ask what is the shape of your implementation about the self.criterion(feat, feat_recon_pos, feat_recon_neg)?

from lba.

sanghoooon avatar sanghoooon commented on August 25, 2024

All of them have to be [batch size, fdim, H, W].
Check out soft_warping in model.py

from lba.

cq0907 avatar cq0907 commented on August 25, 2024

All of them have to be [batch size, fdim, H, W]. Check out soft_warping in model.py

I have the same problem, so may i want to ask what is the shape of your implementation about the comask_pos?

from lba.

sanghoooon avatar sanghoooon commented on August 25, 2024

Below are i/o dimensions for compute_comask that outputs comask_pos:

  • matching_pr [bs, hw, hw]
  • mask_q [bs, 1, h, w]
  • mask_k [bs, 1, h, w]
  • comask [bs, 1, h, w]

where h and w are height and width of feature maps, respectively.

from lba.

cq0907 avatar cq0907 commented on August 25, 2024

Below are i/o dimensions for compute_comask that outputs comask_pos:

  • matching_pr [bs, hw, hw]
  • mask_q [bs, 1, h, w]
  • mask_k [bs, 1, h, w]
  • comask [bs, 1, h, w]

where h and w are height and width of feature maps, respectively.

OK, thank you!

from lba.

Related Issues (6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.