Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generator #17

Open
swed397 opened this issue Oct 14, 2019 · 0 comments
Open

Generator #17

swed397 opened this issue Oct 14, 2019 · 0 comments

Comments

@swed397
Copy link

swed397 commented Oct 14, 2019

Hello, could you tell me where i can find triplet_generator()?
from data import triplet_generator

triplet_generator() creates a generator that continuously returns

([a_batch, p_batch, n_batch], None) tuples where a_batch, p_batch

and n_batch are batches of anchor, positive and negative RGB images

each having a shape of (batch_size, 96, 96, 3).

generator = triplet_generator()

nn4_small2_train.compile(loss=None, optimizer='adam')
nn4_small2_train.fit_generator(generator, epochs=10, steps_per_epoch=100)

Please note that the current implementation of the generator only generates

random image data. The main goal of this code snippet is to demonstrate

the general setup for model training. In the following, we will anyway

use a pre-trained model so we don't need a generator here that operates

on real training data. I'll maybe provide a fully functional generator

later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant