markusthill / bioma-tcn-ae Goto Github PK
View Code? Open in Web Editor NEWMinimal Working Example of a (baseline) Temporal Convolutional Autoencoder (TCN-AE) for Anomaly Detection in Time Series
Minimal Working Example of a (baseline) Temporal Convolutional Autoencoder (TCN-AE) for Anomaly Detection in Time Series
Conv1DTranspose
layer of Keras shall be used instead of UpSampling1D
since it only does upsampling, not deconvolution.
Place in the code:
https://github.com/MarkusThill/bioma-tcn-ae/blob/main/src/tcnae.py#L127
Conv1DTranspose:
https://keras.io/api/layers/convolution_layers/convolution1d_transpose/
As for the Feature map reduction mentioned in the article[1], I did not find it in your code or keras_tcn. So I have a problem with adding this layer, which is where to add it:
About whether "Feature map reduction" should be added before or after Residual Connections in TCN, like:
out = self.net(x) # net is TCN
res = x if self.downsample is None else self.downsample(x)
return self.relu(out + res), out
Should I go for reduction ‘out’ or ‘self.relu(out + res)’?
Looking forward to your response!
[1]Thill M, Konen W, Wang H, et al. Temporal convolutional autoencoder for unsupervised anomaly detection in time series[J]. Applied Soft Computing, 2021, 112: 107751.
Hi, I want to test TCN-AE on my own dataset, and there is a problem, could you help me see how to solve it?
My dataset shape is (1000,300,300), I changed the model input parameter ts_dimension to 300, and run model.fit but it got an error ValueError: Dimensions must be equal, but are 294 and 300 for 'loss/dense_13_loss/sub' (op: 'Sub') with input shapes: [?,294,300], [?,300,300].
I checked your dataset shape and it was (19791, 1050, 1), so when I changed the data shape to (1000,1050,300) it can run well. I guess there's something wrong with the convolution layer, maybe the latent_sample_rate? But I haven't found a solution so far. Could you help me, thank you very much!
Using padding=same for time series data will refer to future data.
Can you elaborate on this part?
Thank you very much for your answer.
Hi, I am studying your research and have a few questions regarding your code.
In Section 2.6.3, "Utilizing hidden representations for the anomaly detection task," you took the blue bar from Fig. 3 and apply a 1 x 1 convolution layer to reduce the channel size from 16 (as shown in the figure) to 1.
However, from the provided explanation, it seems the 1 x 1 convolution layer is not included in the training loop. I am curious if using an untrained convolution layer to reduce the feature dimension is feasible or if it might negatively impact performance.
Additionally, in Section 2.6.4, "Feature map reduction," you place 1 x 1 convolutions after each dilated convolutional layer to reduce the feature map dimension. Based on Issue #3, my understanding is that these layers are optionally included in the training loop. Typically, adding additional layers (such as 1 x 1 convolutions) would increase training time and the number of parameters.
Could you please explain how adding these additional layers (1 x 1 convolutions) helps in reducing trainable parameters and training time?
Could you also provide the code for this part?
Thank you for your help :)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.