microsoft / tf2-gnn

TensorFlow 2 library implementing Graph Neural Networks
MIT License
371 stars 73 forks source link

feat(WeightedSumGraphRepresentation): Allow clipping node reprs before summation #22

Closed mmjb closed 4 years ago

mmjb commented 4 years ago

This implements a new feature to clip values of the (transformed) node representations before summing them up. This is particularly important for using the layer using the (weighted) summation modes ("sigmoid", "none"), as those otherwise can lead to values of extremely large magnitudes. [I've noticed by trying them out in the MoLeRVAE setting.] Clipping before summation allows the layer to still perform tasks such as counting the number of nodes, which would be limited by clipping after summation.