565960370df285169f4a2b2a7368e3d9f07e6617,tasks/imdb_tcn.py,,,#,15

Before Change


y_train = np.array(y_train)
y_test = np.array(y_test)

i = Input(shape=(maxlen,))
x = Embedding(max_features, 128)(i)
x = TCN(nb_filters=64,
        kernel_size=6,
        dilations=[1, 2, 4, 8, 16, 32, 64])(x)
x = Dropout(0.5)(x)
x = Dense(1, activation="sigmoid")(x)

model = Model(inputs=[i], outputs=[x])

model.summary()

After Change


    Dense(1, activation="sigmoid")
])

print(f"TCN receptive field: {model.layers[1].receptive_field}.")

model.summary()
model.compile("adam", "binary_crossentropy", metrics=["accuracy"])
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

Instances


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: deepchem/deepchem
Commit Name: 5bc94ca6b68471029002bc66b8543fe7f9529654
Time: 2020-04-04
Author: bharath@Bharaths-MBP.zyxel.com
File Name: deepchem/models/graph_models.py
Class Name: DAGModel
Method Name: __init__


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: