Improve EGNN stability for high neighbor counts
mainWhen using a high number of neighbors (num_nearest_neighbors), the architecture can become unstable. To mitigate this, use the following settings:
- Set
norm_coors = Trueto normalize relative coordinates. - Set
coor_weights_clamp_valueto an absolute clamped value for coordinate weights.
import torch
from egnn_pytorch import EGNN_Network
net = EGNN_Network(
num_tokens = 21,
dim = 32,
depth = 3,
num_nearest_neighbors = 32,
norm_coors = True,
coor_weights_clamp_value = 2.
)