spencerbraun / anomaly_transformer_pytorch

PyTorch implementation of Anomaly Transformer: Time Series Anomaly Detection with Association Discrepancy
MIT License
222 stars 53 forks source link

update model.py #8

Open hyli666 opened 2 years ago

hyli666 commented 2 years ago

Hi, thanks for sharing codes. I tried to revise the model according to your paper. 1). Fixed KL divergency calculation bug. 2). Added feature for supporting batch processing. (input: [batch, N, d]) 3). Fixed problem when the dimension of input is not equal to that of Transformer. ( d != d_model)