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

gray scale image issue #10

Open
yaozr opened this issue May 11, 2021 · 1 comment
Open

gray scale image issue #10

yaozr opened this issue May 11, 2021 · 1 comment

Comments

@yaozr
Copy link

yaozr commented May 11, 2021

for the genwts.py:

tmp = torch.ones(1, 3, 224, 224).to('cuda:0')
print('input: ', tmp)
out = net(tmp)
print('output:', out)
summary(net, (3, 224, 224))

if I train use gray scale image, should I change the 3 into 1 for the above codes?

Thanks!

@YuzhouPeng
Copy link
Owner

yes, if you trained with grayscale image, you need to change this to 1 to fit the channel number, meanwhile you should also change the channel number of input in cpp file's inference and netconstruction function

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