You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I encountered a bug in the GraphGym module of PyG 2.4.0. It was due to an incorrect handling of inner dimension setting, resulting in unexpected hidden dimension of the constructed MLP. In some cases, it could also fail to construct the MLP.
To demonstrate the problem, please refer to the following example, where I want to create a 2-layer MLP with hidden dimension of 20.
However, as shown in the output, the actual hidden dimension was set to be the same as the input dimension, 10, instead of the intended dimension of 20. This was supposed to be the default behavior when dim_inner was not set, i.e., dim_inner=None. Conversely, when dim_inner is indeed unset, it results in an error due to trying to set the Linear layer with None dimension:
🐛 Describe the bug
I encountered a bug in the GraphGym module of PyG 2.4.0. It was due to an incorrect handling of inner dimension setting, resulting in unexpected hidden dimension of the constructed MLP. In some cases, it could also fail to construct the MLP.
To demonstrate the problem, please refer to the following example, where I want to create a 2-layer MLP with hidden dimension of 20.
However, as shown in the output, the actual hidden dimension was set to be the same as the input dimension, 10, instead of the intended dimension of 20. This was supposed to be the default behavior when
dim_inner
was not set, i.e.,dim_inner=None
. Conversely, whendim_inner
is indeed unset, it results in an error due to trying to set the Linear layer with None dimension:The bug was introduced in #7885, which turned
into
The fix is pretty simple, just reverse the if statement.
Environment
conda
,pip
, source):torch-scatter
):The text was updated successfully, but these errors were encountered: