Last active
March 4, 2018 23:37
-
-
Save eisenjulian/3a2dabb3a57cbcc70303c64c06cd91b9 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
def my_initializer(shape=None, dtype=tf.float32, partition_info=None): | |
assert dtype is tf.float32 | |
return embedding_matrix | |
params = {'embedding_initializer': my_initializer} | |
cnn_pretrained_classifier = tf.estimator.Estimator( | |
model_fn=cnn_model_fn, | |
model_dir=os.path.join(model_dir, 'cnn_pretrained'), | |
params=params) | |
train_and_evaluate(cnn_pretrained_classifier) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment