Comments (5)
@JonathanHuangC Good question. It comes from this repo. I've transferred your question.
laiguokun/multivariate-time-series-data#7
from keras-tcn.
@philipperemy
Is there any example of using TCN to extract features?
For example, compressing the exchange rate of [1000 * 8] into [1 * 8], where 1000 represents the day and 8 is the feature of the data.
Thank you very much for your reply.
from keras-tcn.
You mean some form of auto encoding? You can just search for LSTM features extraction and you swap the LSTM class with the TCN class and it should work.
from keras-tcn.
You mean some form of auto encoding? -> Yes, it seems to be using TCN to implement the auto encoder.
Do you mean that it is enough to change LSTM to TCN? Sorry for there are a lot of questions.
Thank you again for your reply.
LSTM autoencoder
define model
model = Sequential()
Encoder step
model.add(LSTM(15, input_shape=(X_train.shape[1], X_train.shape[2]), activation='relu'))
model.add(RepeatVector(X_train.shape[1]))
Decoder step
model.add(LSTM(15, activation='relu', return_sequences=True))
model.add(TimeDistributed(Dense(X_train.shape[2])))
model.compile(optimizer='adam', loss='mse')
history = model.fit(X_train, X_train, epochs=_epochs, batch_size = _batch_size,
validation_split=_validation_split, callbacks=callback)
TCN autoencoder
define model
model = Sequential()
Encoder step
model.add(TCN(15, input_shape=(X_train.shape[1], X_train.shape[2]), activation='relu'))
model.add(RepeatVector(X_train.shape[1]))
Decoder step
model.add(TCN(15, activation='relu', return_sequences=True))
model.add(TimeDistributed(Dense(X_train.shape[2])))
model.compile(optimizer='adam', loss='mse')
history = model.fit(X_train, X_train, epochs=_epochs, batch_size = _batch_size,
validation_split=_validation_split, callbacks=callback)
from keras-tcn.
yeah it's as easy as swapping the class.
from keras-tcn.
Related Issues (20)
- setup.py requirements on mac os HOT 7
- How do I use a masking layer for TCN? I want to mask certain time steps which are missing. HOT 4
- ValueError: Unknown layer: TCN when trying to load saved model HOT 3
- Dilations and nb_stack relationship HOT 4
- The parameter of the TCN HOT 7
- Masking time steps in order to use TCN for variable length sequences HOT 2
- data shape of tcn layer HOT 1
- help one regression per sequence HOT 1
- Ensuring unique weights when a model uses multiple TCNs HOT 2
- Question: TCN Dilated Convolutions? HOT 3
- How can i use TCN to build seq2seq model? HOT 1
- keras-tcn for R HOT 2
- Visualization of internal structure of TCN block HOT 1
- Low accuracy in keras-tuner based TCN model for audio classification HOT 6
- Saving a loaded model gets warning and then fails to open HOT 1
- Question: Skip connections HOT 2
- Why is the data form (batch_size, timesteps, input_dim) instead less accurate than (batch_size, input_dim, timesteps)?
- Keras 3 support HOT 4
- Confusion about regression or classification head
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from keras-tcn.