Git Product home page Git Product logo

Comments (6)

junxia97 avatar junxia97 commented on June 22, 2024

您好,感谢您对我们工作的兴趣。我以伪代码的形式展示出我们是如何计算alignment和uniformity (该部分是我们单独计算、分析的):

# bsz : batch size (number of positive pairs)
# d   : latent dim
# x   : Tensor, shape=[bsz, d]
#       latents for one side of positive pairs
# y   : Tensor, shape=[bsz, d]
#       latents for the other side of positive pairs

def align_metric(x, y, alpha=2):
    return (x - y).norm(p=2, dim=1).pow(alpha).mean()

def uniform_metric(x, t=2):
    return torch.pdist(x, p=2).pow(2).mul(-t).exp().mean().log()

from simgrace.

githubXin123 avatar githubXin123 commented on June 22, 2024

好的,谢谢。

from simgrace.

XuexiongLuoMQ avatar XuexiongLuoMQ commented on June 22, 2024

您好,我想问下您代码中deepinformax.py文件是用来做什么的呢?

from simgrace.

junxia97 avatar junxia97 commented on June 22, 2024

您好,deepinformax.py文件只是对其他无监督图表征学习方法的复现。

from simgrace.

mpanpan avatar mpanpan commented on June 22, 2024

你好,我想问下这个代码的环境是什么版本的呢?使用torch1.10+cu111不太行

from simgrace.

junxia97 avatar junxia97 commented on June 22, 2024
  • Python 3.7.4
  • PyTorch 1.7.0
  • torch_geometric 1.5.0
    不同类别实验的具体配置不一样,你可以参考下每个文件夹下的readme文件

from simgrace.

Related Issues (5)

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.