chickenbestlover / RNN-Time-series-Anomaly-Detection

RNN based Time-series Anomaly detector model implemented in Pytorch.
Apache License 2.0
1.2k stars 318 forks source link

RuntimeError when using tie_weights=True #47

Open palubak opened 2 years ago

palubak commented 2 years ago

it had RuntimeError when using tie_weights=True. The error was "he expanded size of the tensor (32) must match the existing size (2) at non-singleton dimension 1. Target sizes: [64, 32]. Tensor sizes: [2]". After checking the code again, i found there was code "self.decoder.weight = self.encoder.weight" in class RNNPredictor() init. decoder.weight was assigned encoder.weight's size. it caused error when using decoder function