Facelet_Bank
Facelet_Bank copied to clipboard
input.size[1] == 3 but got 4 instead
Hi,@yingcong , it has 4 channels when I input a color picture with your code like this:
do you know the reason? thank you!
Hi @Amanda-Barbara , do you use a png image? If so, the last channel should be a A channel. You can simply ignored it by using img = img[:, :, :3]
yeah,I have done it, the last channel value are same. when I ran 940th picture there have an error like this: RuntimeError: cuda runtime error (2) : out of memory at /pytorch/torch/lib/THC/generic/THCStorage.cu:66 but I did not modify the code on other place.
Seems like an out-of-memory problem. May be the gpu is occupied or the size of the image is too large. If you have multiple gpu, you can append "-gpu x" in your bash command, where x is the gpu id, such as 0,1 otherwise, you can append "-cpu" instead to use cpu mode.
I have filtered the high-resolution images and the the project can go on running,thanks @yingcong
Great! You are welcome.