Created
August 3, 2019 14:06
-
-
Save NMZivkovic/5289255cd3b3cd51509aa182a97ecfeb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
maskHandler = MaskHandler() | |
x = tf.constant([[1, 2, 0, 0, 6], [1, 1, 1, 0, 0], [0, 0, 0, 6, 9]]) | |
mask = maskHandler.padding_mask(x) | |
print("Padding Mask Example:") | |
print("-----------") | |
print(mask) | |
print("-----------") | |
x = tf.random.uniform((1, 3)) | |
mask = maskHandler.look_ahead_mask(x.shape[1]) | |
print("Look Ahead Mask Example:") | |
print("-----------") | |
print(mask) | |
print("-----------") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment