项目文件夹

文件
xnouhz 0b47e86803 [Example] Add DimeNet(++) for Molecular Graph Property Prediction (#2706)
* [example] arma

* update

* update

* update

* update

* update

* [example] dimenet

* [docs] update dimenet

* [docs] update tf results

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

Co-authored-by: Mufei Li <mufeili1996@gmail.com>
2021-03-09 17:08:59 +08:00

7 行
235 B
Python

import torch.nn as nn
def GlorotOrthogonal(tensor, scale=2.0):
if tensor is not None:
nn.init.orthogonal_(tensor.data)
scale /= (tensor.size(-2) + tensor.size(-1)) * tensor.var()
tensor.data *= scale.sqrt()