0cfe82c6beb9a28a5ff7da81b86fa0e93c388f14,tasks/save_reload_model.py,,,#,10
Before Change
// simple TCN model.
max_len = 100
max_features = 50
i = Input(shape=(max_len,))
x = Embedding(max_features, 16)(i)
x = TCN(nb_filters=12,
dropout_rate=0.5, // with dropout here.
kernel_size=6,
dilations=[1, 2, 4])(x)
x = Dropout(0.5)(x) // and dropout here.
x = Dense(1, activation="sigmoid")(x)
model = Model(inputs=[i], outputs=[x])
if os.path.exists("tcn.npz"):
// Load checkpoint if file exists.
w = np.load("tcn.npz", allow_pickle=True)["w"]
After Change
max_features = 50
// make model
model = Sequential(layers=[Embedding(max_features, 16, input_shape=(max_len,)),
TCN(nb_filters=12,
dropout_rate=0.5,
kernel_size=6,
dilations=[1, 2, 4]),
Dropout(0.5),
Dense(units=1, activation="sigmoid")])
// get model as json string and save to file
model_as_json = model.to_json()
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 15
Instances
Project Name: philipperemy/keras-tcn
Commit Name: 0cfe82c6beb9a28a5ff7da81b86fa0e93c388f14
Time: 2019-11-20
Author: premy@cogent.co.jp
File Name: tasks/save_reload_model.py
Class Name:
Method Name:
Project Name: philipperemy/keras-tcn
Commit Name: 565960370df285169f4a2b2a7368e3d9f07e6617
Time: 2021-03-09
Author: premy.enseirb@gmail.com
File Name: tasks/imdb_tcn.py
Class Name:
Method Name:
Project Name: philipperemy/keras-tcn
Commit Name: ae301db7f0550e47ae79f2a098e6f342a2227e73
Time: 2021-03-09
Author: premy.enseirb@gmail.com
File Name: tasks/multi_length_sequences.py
Class Name:
Method Name: