This file contains 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
"""An example of how to use tf.Dataset in Keras Model""" | |
import tensorflow as tf # only work from tensorflow==1.9.0-rc1 and after | |
_EPOCHS = 5 | |
_NUM_CLASSES = 10 | |
_BATCH_SIZE = 128 | |
def training_pipeline(): | |
# ############# | |
# Load Dataset |
This file contains 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
#!/usr/bin/env python | |
""" | |
A Siamese network example modified to use weighted L1 distance and cross-entropy loss, as in | |
Siamese Neural Networks for One-shot Image Recognition | |
http://www.cs.toronto.edu/~rsalakhu/papers/oneshot1.pdf | |
""" |