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

How to deal with multi-channel across different data sets? #94

Open
brando90 opened this issue May 11, 2022 · 1 comment
Open

How to deal with multi-channel across different data sets? #94

brando90 opened this issue May 11, 2022 · 1 comment
Labels
question Further information is requested

Comments

@brando90
Copy link

Hi,

I was curious, how do you deal when one data set has 3 channels (imagenet) but others have 1 (omniglot)?

I've seen others do:

    transform = transforms.Compose([
        lambda x: x.convert("RGB"),
        transforms.Resize(224),
        transforms.ToTensor(),
    ])

in pytorch. Is that what you do?

@lamblin lamblin added the question Further information is requested label May 11, 2022
@lamblin
Copy link
Collaborator

lamblin commented May 11, 2022

We use tf.image.decode_image passing explicitly channels=3, see here.

Then we resize with tf.image.resize_images, and map values to [-1, 1].

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Development

No branches or pull requests

2 participants