Comments (6)
您好,感谢您对我们工作的兴趣。我以伪代码的形式展示出我们是如何计算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.
好的,谢谢。
from simgrace.
您好,我想问下您代码中deepinformax.py文件是用来做什么的呢?
from simgrace.
您好,deepinformax.py文件只是对其他无监督图表征学习方法的复现。
from simgrace.
你好,我想问下这个代码的环境是什么版本的呢?使用torch1.10+cu111不太行
from simgrace.
- Python 3.7.4
- PyTorch 1.7.0
- torch_geometric 1.5.0
不同类别实验的具体配置不一样,你可以参考下每个文件夹下的readme文件
from simgrace.
Related Issues (5)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from simgrace.