Skip to content

Commit

Permalink
Add test for saving
Browse files Browse the repository at this point in the history
  • Loading branch information
Squadrick committed Nov 12, 2019
1 parent d29c51d commit 833f807
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tensorflow_addons/layers/wrappers_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,17 @@ def test_weightnorm_with_time_dist(self):
out = tf.keras.layers.TimeDistributed(b)(inputs)
model = tf.keras.Model(inputs, out)

def test_save_file_h5(self):
conv = tf.keras.layers.Conv1D(1, 1)
wn_conv = wrappers.WeightNormalization(conv)
model = tf.keras.Sequential(layers=[wn_conv])
model.build([1, 2, 3])
model.save_weights('/tmp/model.h5')

import os
os.remove('/tmp/model.h5')
# TODO: Find a better way to test this


if __name__ == "__main__":
tf.test.main()

0 comments on commit 833f807

Please sign in to comment.