omoindrot / tensorflow-triplet-loss

Implementation of triplet loss in TensorFlow
https://omoindrot.github.io/triplet-loss
MIT License
1.12k stars 284 forks source link

loading own dataset #31

Open mahsa631 opened 5 years ago

mahsa631 commented 5 years ago

how can i load my own dataset instead of Mnist dataset?( dataset = mnist_dataset.train(data_dir)

omoindrot commented 5 years ago

See a similar question in #8.

mahsa631 commented 5 years ago

thanks a lot for your useful code...i could run it for Mnist dataset but i need run it for my image dataset ...it has been explained in post #8 but i cant understand clearly...what changes dose "input_fn" need?do i just delete ( dataset = mnist_dataset.test(data_dir) from input_fn?please guide me i really need it

omoindrot commented 5 years ago

You should read the TensorFlow guide on tf.data to understand datasets a bit better maybe.

The input_fn just needs to return a tf.data.Dataset that will be used in the model_fn.