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
Traceback (most recent call last):
File "gsimclr.py", line 190, in
emb, y = model.encoder.get_embeddings(dataloader_eval)
File "/data3/linshuai/GraphCL/unsupervised_TU/gin.py", line 87, in get_embeddings
x, _ = self.forward(x, edge_index, batch)
File "/data3/linshuai/GraphCL/unsupervised_TU/gin.py", line 61, in forward
x = F.relu(self.convs[i](x, edge_index))
File "/data/linshuai/anaconda3/envs/mvgrl/lib/python3.6/site-packages/torch/nn/modules/module.py", line 532, in call
result = self.forward(*input, **kwargs)
File "/data/linshuai/anaconda3/envs/mvgrl/lib/python3.6/site-packages/torch_geometric/nn/conv/gin_conv.py", line 69, in forward
return self.nn(out)
File "/data/linshuai/anaconda3/envs/mvgrl/lib/python3.6/site-packages/torch/nn/modules/module.py", line 532, in call
result = self.forward(*input, **kwargs)
File "/data/linshuai/anaconda3/envs/mvgrl/lib/python3.6/site-packages/torch/nn/modules/container.py", line 100, in forward
input = module(input)
File "/data/linshuai/anaconda3/envs/mvgrl/lib/python3.6/site-packages/torch/nn/modules/module.py", line 532, in call
result = self.forward(*input, **kwargs)
File "/data/linshuai/anaconda3/envs/mvgrl/lib/python3.6/site-packages/torch/nn/modules/linear.py", line 87, in forward
return F.linear(input, self.weight, self.bias)
File "/data/linshuai/anaconda3/envs/mvgrl/lib/python3.6/site-packages/torch/nn/functional.py", line 1370, in linear
ret = torch.addmm(bias, input, weight.t())
RuntimeError: size mismatch, m1: [2258 x 1], m2: [7 x 32] at /pytorch/aten/src/THC/generic/THCTensorMathBlas.cu:290
It seems that the aug is 'none' here in the testing and thus the second dim of data_aug.x was set to 1. So I removed this line and the bug was gone.
What's your opinion about the issue and solution? Thanks in advance!
The text was updated successfully, but these errors were encountered:
Thanks for your question. In evaluation data_aug should not be called since get_embeddings function only operate on data of the returned data, data_aug from data_loader (see
Hi @yyou1996,
When I ran the unsupervised experiments for Biochemical Molecules datasets, I met the bug of
size mismatch
as follows:python gsimclr.py --DS MUTAG --lr 0.01 --local --num-gc-layers 3 --aug dnodes --seed 0
188
7
lr: 0.01
num_features: 7
hidden_dim: 32
num_gc_layers: 3
Traceback (most recent call last):
File "gsimclr.py", line 190, in
emb, y = model.encoder.get_embeddings(dataloader_eval)
File "/data3/linshuai/GraphCL/unsupervised_TU/gin.py", line 87, in get_embeddings
x, _ = self.forward(x, edge_index, batch)
File "/data3/linshuai/GraphCL/unsupervised_TU/gin.py", line 61, in forward
x = F.relu(self.convs[i](x, edge_index))
File "/data/linshuai/anaconda3/envs/mvgrl/lib/python3.6/site-packages/torch/nn/modules/module.py", line 532, in call
result = self.forward(*input, **kwargs)
File "/data/linshuai/anaconda3/envs/mvgrl/lib/python3.6/site-packages/torch_geometric/nn/conv/gin_conv.py", line 69, in forward
return self.nn(out)
File "/data/linshuai/anaconda3/envs/mvgrl/lib/python3.6/site-packages/torch/nn/modules/module.py", line 532, in call
result = self.forward(*input, **kwargs)
File "/data/linshuai/anaconda3/envs/mvgrl/lib/python3.6/site-packages/torch/nn/modules/container.py", line 100, in forward
input = module(input)
File "/data/linshuai/anaconda3/envs/mvgrl/lib/python3.6/site-packages/torch/nn/modules/module.py", line 532, in call
result = self.forward(*input, **kwargs)
File "/data/linshuai/anaconda3/envs/mvgrl/lib/python3.6/site-packages/torch/nn/modules/linear.py", line 87, in forward
return F.linear(input, self.weight, self.bias)
File "/data/linshuai/anaconda3/envs/mvgrl/lib/python3.6/site-packages/torch/nn/functional.py", line 1370, in linear
ret = torch.addmm(bias, input, weight.t())
RuntimeError: size mismatch, m1: [2258 x 1], m2: [7 x 32] at /pytorch/aten/src/THC/generic/THCTensorMathBlas.cu:290
It seems that the
aug
is 'none' here in the testing and thus the second dim ofdata_aug.x
was set to1
. So I removed this line and the bug was gone.What's your opinion about the issue and solution? Thanks in advance!
The text was updated successfully, but these errors were encountered: