Skip to content

Generator #17

@swed397

Description

@swed397

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions