Open fuyuanlyu opened 6 months ago
It might be a typo. I've updated TemporalEncoder(device, 1, **kwargs) <-TemporalEncoder(device, **kwargs)
. It should be fine now.
Yes, it does. Thanks for the quick update!
Hi authors,
After changing according to your suggestions, the code is able to run Phase I training. However, the following error is generated when running Phase II. Could you kindly check? Thanks!
2024-03-12 23:29:40,530 P6057 INFO *** Test F1 0.8437 of traning phase 1
Traceback (most recent call last):
File "/root/autodl-tmp/Hades/hades/codes/run.py", line 129, in <module>
main([4,3,2,2])
File "/root/autodl-tmp/Hades/hades/codes/run.py", line 119, in main
scores = model.fit(train_loader, unlabel_loader, test_loader)
File "/root/autodl-tmp/Hades/hades/codes/models/base.py", line 191, in fit
pseudo_data = self.inference(unlabel_loader)
File "/root/autodl-tmp/Hades/hades/codes/models/base.py", line 76, in inference
result = self.model.forward(self.__input2device(_input), flag=True)
File "/root/autodl-tmp/Hades/hades/codes/models/fuse.py", line 117, in forward
fused_re, (kpi_re, log_re) = self.encoder(input_dict["kpi_features"], input_dict["log_features"])
File "/root/miniconda3/envs/Hades/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1511, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/root/miniconda3/envs/Hades/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1520, in _call_impl
return forward_call(*args, **kwargs)
File "/root/autodl-tmp/Hades/hades/codes/models/fuse.py", line 65, in forward
kpi_re = self.kpi_encoder(kpi_x) #[batch_size, T, hidden_size]
File "/root/miniconda3/envs/Hades/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1511, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/root/miniconda3/envs/Hades/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1520, in _call_impl
return forward_call(*args, **kwargs)
File "/root/autodl-tmp/Hades/hades/codes/models/kpi_model.py", line 116, in forward
inner_input = encoded_metric.permute(1, 2, 0) #--> [batch_size, T, metric_num]
RuntimeError: permute(sparse_coo): number of dimensions in the tensor input does not match the length of the desired ordering of dimensions i.e. input.dim() = 2 is not equal to len(dims) = 3
Could you please add some printing statements so that I can further diagnose the issue?
Like the size of input_dict["kpi_features"]
, the size of input_dict["log_features"]
, the size of kpi_re
Hi authors,
Thanks for your detailed codebase. However, I encounter the following error when I run
Error:
Could you kindly check what's going wrong? Appreciated!