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

lpips fails when when used with one channel images #5

Open
agniszczotka opened this issue May 9, 2019 · 1 comment
Open

lpips fails when when used with one channel images #5

agniszczotka opened this issue May 9, 2019 · 1 comment

Comments

@agniszczotka
Copy link

ValueError: Dimension size must be evenly divisible by 3 but is 1
Number of ways to split should evenly divide the split dimension for 'import/split_1' (op: 'Split') with input shapes: [], [?,?,?,1] and with computed input tensors: input[0] = <-1>.

@agniszczotka agniszczotka changed the title lpips fails when when used with batches lpips fails when when used with one channel images May 12, 2019
@crrrr30
Copy link

crrrr30 commented Jan 22, 2020

I believe all ImageNet pretrained models accept only 3-channel inputs. I suggest copying the channels as follows:

Given x, a tensor of rank 4, of one channel

x = tf.tile(x, [1, 1, 1, 3])

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

2 participants