Last active
July 31, 2018 11:00
-
-
Save sdcubber/52b66bde67bf46f2f02eb24d20629f97 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
with tf.Session() as sess: | |
tf.keras.backend.set_session(sess) | |
sess.run(ds_tr_init) # initialize the generator | |
# Rewire network to tie it into the generator | |
image_input = tf.keras.Input(tensor=x) | |
# Model definition | |
... | |
# Specify the model | |
model = tf.keras.Model(inputs=image_input, outputs=[weather_output, ground_output]) | |
# Supply the outputs of the generator as target tensors | |
model.compile(optimizer='adam', loss='binary_crossentropy', target_tensors=[w,g]) | |
model.fit(steps_per_epoch=len(df_train) // batch_size, verbose=1, epochs=1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment