KDD-OpenSource / DeepADoTS

Repository of the paper "A Systematic Evaluation of Deep Anomaly Detection Methods for Time Series".

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DAGMM_NNAutoEncoder_withWindow: RuntimeError: Expected object of type torch.FloatTensor but found type torch.cuda.FloatTensor for argument #4 'mat1'

WGierke opened this issue · comments

2018-06-21 07:58:28 [INFO] src.evaluation.evaluator: Training DAGMM_NNAutoEncoder_withWindow on Syn Extreme Outliers (pol=0.25)
2018-06-21 07:58:28 [ERROR] src.evaluation.evaluator: An exception occurred while training DAGMM_NNAutoEncoder_withWindow on Syn Extreme Outliers (pol=0.25): Expected object of type torch.FloatTensor but found t
ype torch.cuda.FloatTensor for argument #4 'mat1'
2018-06-21 07:58:28 [ERROR] src.evaluation.evaluator: Traceback (most recent call last):
  File "/repo/src/evaluation/evaluator.py", line 71, in evaluate
    det.fit(X_train, y_train)
  File "/repo/src/algorithms/dagmm.py", line 199, in fit
    self.dagmm_step(input_data.float())
  File "/repo/src/algorithms/dagmm.py", line 169, in dagmm_step
    enc, dec, z, gamma = self.dagmm(input_data)
  File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 491, in __call__
    result = self.forward(*input, **kwargs)
  File "/repo/src/algorithms/dagmm.py", line 48, in forward
    dec, enc = self.autoencoder(x)
  File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 491, in __call__
    result = self.forward(*input, **kwargs)
  File "/repo/src/algorithms/autoencoder.py", line 41, in forward
    enc = self._encoder(x)
  File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 491, in __call__
    result = self.forward(*input, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/container.py", line 91, in forward
    input = module(input)
  File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 491, in __call__
    result = self.forward(*input, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/linear.py", line 55, in forward
    return F.linear(input, self.weight, self.bias)
  File "/usr/local/lib/python3.6/dist-packages/torch/nn/functional.py", line 992, in linear
    return torch.addmm(bias, input, weight.t())
RuntimeError: Expected object of type torch.FloatTensor but found type torch.cuda.FloatTensor for argument #4 'mat1'

Closed via d5cced5