Comments (1)
I have used another way to construct the model network. And the problem fixed. I will close this issue.
import numpy as np
from tensorflow.keras.layers import Dense
from tensorflow.keras.models import Sequential
from cond_rnn import ConditionalRNN
i1 = Input(shape = (X_train.shape[1], X_train.shape[2]))
ic_1 = Input(shape=(categorical_appid.shape[1],))
ic_2 = Input(shape=(categorical_advertiser.shape[1],))
cond_rnn_layer = ConditionalRNN(units=64, cell='LSTM', return_sequences=True, mask=-1)([i1, ic_1, ic_2])
out_layer = TimeDistributed(Dense(Y_train_non_lt.shape[2], activation='relu'),name = 'm_output')(cond_rnn_layer)
model = Model([i1, ic_1, ic_2], out_layer)
optim = Adam(lr=0.003,)
model.compile(optimizer=optim, loss={'m_output': 'mse'}, metrics={'m_output': 'mse'})
callbacks = [
EarlyStopping(patience=30, monitor='val_mse'),
ModelCheckpoint(filepath='model_tuning/day_20210511/seq_model.{epoch:02d}-{val_loss:.2f}.h5', monitor="val_loss", save_best_only=True),
TensorBoard(log_dir='./training_logs_0511/seq'),
]
out = model.fit(x=[X_train, categorical_appid, categorical_advertiser], y=Y_train, epochs=100, batch_size = 1024, verbose=2, callbacks=callbacks, workers = 100, validation_data=([X_eval, categorical_appid_eval, categorical_advertiser_eval], Y_eval),
sample_weight=None)
from cond_rnn.
Related Issues (20)
- Dummy stations example HOT 3
- Sequential vs Functional API. Drop in model accuracy HOT 3
- Question on conditions HOT 5
- Bidirectional LSTM HOT 12
- Question on processing time-series text data HOT 1
- [QUESTION] how to predicting future unseen dataframe? HOT 4
- [QUESTION]
- [QUESTION] Difference between ConditionalRNN and Other Approach HOT 10
- ConditionalRNN or ConditionalRecurrent? HOT 8
- Bidirectional Layer with Functional API HOT 8
- Basic conditional LSTM HOT 2
- Embeding Layer with ConditionalRecurrent HOT 3
- Simple LSTM HOT 7
- No more than 10 conditional features HOT 14
- CondLSTM with Embedding layer HOT 12
- Confusion between conditions? HOT 6
- Adding dropout layer to stacked conditional RNNs HOT 1
- Installation issue HOT 3
- what does the static data shape? HOT 5
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 cond_rnn.