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
the first error i met it
"plum.resolver.NotFoundLookupError: For function device, (device(type='cpu'),) could not be resolved."
Because i run on cpu, so I just replace the "with B.device(B.device(z)):" in "class SetConv1dEncoder(nn.Module):" of "encoder.py" with
"with B.device("cpu"):"
Then error goes to "decoder.py".
Traceback (most recent call last):
File "train_pac.py", line 420, in <module>
tb_writer=writer, global_step=global_step)
File "train_pac.py", line 46, in train
loss_dict = model.loss(task['x_context'], task['y_context'])
File "C:\Users\Desktop\experiments for test set bound\pac-bayes-tightness-small-data-master2\pac-bayes-tightness-small-data-master\pacbayes\classifiers.py", line 481, in loss
post = self.architecture.infer(x, y)
File "C:\Users\Desktop\experiments for test set bound\pac-bayes-tightness-small-data-master2\pac-bayes-tightness-small-data-master\pacbayes\architectures.py", line 52, in infer
means, covs = self.inference_network(x, y) # [B, D], [B, D, D]
File "C:\Users\.conda\envs\py37\lib\site-packages\torch\nn\modules\module.py", line 1130, in _call_impl
return forward_call(*input, **kwargs)
File "C:\Users\Desktop\experiments for test set bound\pac-bayes-tightness-small-data-master2\pac-bayes-tightness-small-data-master\pacbayes\gnp\gnp.py", line 71, in forward
xz, z = self.encoder_mean(x_context, y_context, x_target)
File "C:\Users\.conda\envs\py37\lib\site-packages\torch\nn\modules\module.py", line 1130, in _call_impl
return forward_call(*input, **kwargs)
File "C:\Users\Desktop\experiments for test set bound\pac-bayes-tightness-small-data-master2\pac-bayes-tightness-small-data-master\pacbayes\gnp\encoder.py", line 34, in forward
dists2 = B.pw_dists2(x_grid[None, :], xz)
File "C:\Users\.conda\envs\py37\lib\site-packages\plum\function.py", line 392, in __call__
return _convert(method(*args, **kw_args), return_type)
File "C:\Users\.conda\envs\py37\lib\site-packages\lab\linear_algebra.py", line 502, in pw_dists2
return norms_a + norms_b - 2 * B.matmul(a, b, tr_b=True)
File "C:\Users\.conda\envs\py37\lib\site-packages\plum\function.py", line 392, in __call__
return _convert(method(*args, **kw_args), return_type)
File "C:\Users\.conda\envs\py37\lib\site-packages\lab\shape.py", line 185, in f_wrapped
return f(*(unwrap_dimension(arg) for arg in args), **kw_args)
File "C:\Users\.conda\envs\py37\lib\site-packages\lab\torch\linear_algebra.py", line 21, in matmul
return torch.matmul(a, b)
RuntimeError: mat1 and mat2 shapes cannot be multiplied (480x1 and 128x1)
Any help will be greatly appreciated!!
The text was updated successfully, but these errors were encountered:
Hey @git0405! It seems that there have been some API changes since the release of this repo that broke the code. I've pushed some updates that I believe fix the issue.
Thanks for you help first.
"plum.resolver.NotFoundLookupError: For function
device
,(device(type='cpu'),)
could not be resolved."Because i run on cpu, so I just replace the "with B.device(B.device(z)):" in "class SetConv1dEncoder(nn.Module):" of "encoder.py" with
"with B.device("cpu"):"
Any help will be greatly appreciated!!
The text was updated successfully, but these errors were encountered: