pumpikano / tf-dann

Domain-Adversarial Neural Network in Tensorflow
MIT License
628 stars 224 forks source link

mnistm labels #13

Closed ghost closed 7 years ago

ghost commented 7 years ago

Hi,

Thanks for your code. I found that you use the mnist labels with mnistm dataset even when you are creating the target only batch. Can you explain why is that??

Thanks

pumpikano commented 7 years ago

The MNISTM dataset is simply a transformed version of the MNIST dataset (see create_mnistm.py), so the labels are actually the same, it is the images that are different. I agree that it would probably be more clear if I had replicated the labels and stored them with the MNISTM images.

ghost commented 7 years ago

Hi,

Thanks for your reply. I'm a little bit confused now because as i understand the target dataset is unlabelled. Is not it??

On Tue, May 16, 2017 at 5:14 AM, Clayton Mellina notifications@github.com wrote:

The MNISTM dataset is simply a transformed version of the MNIST dataset (see create_mnistm.py), so the labels are actually the same, it is the images that are different. I agree that it would probably be more clear if I had replicated the labels and stored them with the MNISTM images.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/pumpikano/tf-dann/issues/13#issuecomment-301670778, or mute the thread https://github.com/notifications/unsubscribe-auth/ACvc_IfZOEICHrlx_BqyI6bldKCKTa0Qks5r6SKPgaJpZM4NZZ2I .

-- Best Regards, Fatma Amin Elsafoury

pumpikano commented 7 years ago

Yes, this is a method for domain adaptation when the target domain does not have labels. MNISTM is a toy dataset for which we do have labels. The notebook uses those labels to evaluate the success of the domain adaptation, as well as compare to the case of training directly on the target labels, which provides an upper bound for the success of domain adaptation. When performing domain adaptation, we don't use the target labels as supervision.

ghost commented 7 years ago

but don't you use when creating the

gen_target_batch = batch_generator( [mnistm_train, mnist.train.labels], batch_size / 2)

which is used in the training the domain adaptation model 'dann' ????

best,

On Tue, May 16, 2017 at 4:54 PM, Clayton Mellina notifications@github.com wrote:

Yes, this is a method for domain adaptation when the target domain does not have labels. MNISTM is a toy dataset for which we do have labels. The notebook uses those labels to evaluate the success of the domain adaptation, as well as compare to the case of training directly on the target labels, which provides an upper bound for the success of domain adaptation. When performing domain adaptation, we don't use the target labels as supervision.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/pumpikano/tf-dann/issues/13#issuecomment-301827835, or mute the thread https://github.com/notifications/unsubscribe-auth/ACvc_OPHGD0UytXdL9x1hfpKlCFMC3iwks5r6cbDgaJpZM4NZZ2I .

-- Best Regards, Fatma Amin Elsafoury

pumpikano commented 7 years ago

These are not used during training, though they are used to evaluate the model accuracy after training. In particular, the model.train placeholder governs the behavior: when it is True the second half of the batch (where the target examples and labels reside) does not participate in the prediction loss, and when it is False the entire batch is passed to the prediction network.