gathierry / FastFlow

Apache License 2.0
132 stars 24 forks source link

Do the three categories(grid, screw and zipper) of a single channel need to add code to extend the channel from 1 to 3? #17

Closed sehau closed 2 years ago

sehau commented 2 years ago

Hello, Do the three categories of a single channel need to add code to extend the channel from 1 to 3?

When I'm using a single-channel class, such as Grid. There is an error like it.

RuntimeError: Output with shape [1, 448, 448] doesn't match the broadcast shape [3, 448, 448]

I think adding a channel extension to dataset.py might solve this problem.

or using conversion functions image = Image.open(image_file).convert('RGB') in line 35 of dataset.py.

What do you think? Or am I going about it the wrong way?

cytotoxicity8 commented 2 years ago

I guess the reason is the version of some packages. Actually I noticed the error, so fixed the problem as the screenshot below. (See the commented code with #)

image

sehau commented 2 years ago

I guess the reason is the version of some packages. Actually I noticed the error, so fixed the problem as the screenshot below. (See the commented code with #)

image

Thanks for your reply. I got it.