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

数据集问题 #29

Open
18718277909 opened this issue Nov 25, 2020 · 5 comments
Open

数据集问题 #29

18718277909 opened this issue Nov 25, 2020 · 5 comments

Comments

@18718277909
Copy link

你好,
感谢你所做的贡献。
请问我在用DUTS-TR数据集训练网络的时候,我把数据集按照说明需要的方式:images/a.jpg masks/a.jpg,这样放置了,但为什么还是报错‘size of input tensor and input format are different. tensor shape: (1, 1, 28, 28), input_format: CHW’,请问能否解答一下,谢谢

@Ugness
Copy link
Owner

Ugness commented Nov 25, 2020

Would you introduce the specific code line that the error occurs?
Also, would you translate your question into English, please?
I cannot read Chinese. It would be better to attach the English question and the Chinese question together.

@18718277909
Copy link
Author

Hello,
Thank you for your contribution.
When I use DUTS-TR data set to train the network, I put the data set in the way required by the instructions: images / a.jpg masks / a.jpg, but why is the error:
'File "train.py", line 108, in
writer.add_image('{}'.format(masked.size()[2]), masked, global_step=iterate)
File "C:\Users\admin.conda\envs\pytorch\lib\site-packages\tensorboardX\writer.py", line 608, in add_image
image(tag, img_tensor, dataformats=dataformats), global_step, walltime)
File "C:\Users\admin.conda\envs\pytorch\lib\site-packages\tensorboardX\summary.py", line 283, in image
tensor = convert_to_HWC(tensor, dataformats)
File "C:\Users\admin.conda\envs\pytorch\lib\site-packages\tensorboardX\utils.py", line 103, in convert_to_HWC
tensor shape: {}, input_format: {}".format(tensor.shape, input_format)
AssertionError: size of input tensor and input format are different. tensor shape: (1, 1, 28, 28), input_format: CHW
Can you give me an answer please?
Thank you

@Ugness
Copy link
Owner

Ugness commented Nov 25, 2020

I think your issue is related with #12 (comment).
Please check your tensorboardX version. Thank you.

@18718277909
Copy link
Author

I think your issue is related with #12 (comment).
Please check your tensorboardX version. Thank you.

Thank you for your help, but why I am training my dataset, it is

Epoch : 19
0%|▏ | 3/5019 [00:01<32:24, 2.58it/s]
0%|▏ | 4/5019 [00:01<32:40, 2.56it/s]
0%|▏ | 5/5019 [00:01<32:12, 2.60it/s]
0%|▎ | 6/5019 [00:02<33:35, 2.49it/s]
0%|▎ | 7/5019 [00:02<33:14, 2.51it/s]
0%|▎ | 8/5019 [00:03<32:43, 2.55it/s]
0%|▍ | 9/5019 [00:03<32:07, 2.60it/s]
0%|▍ | 10/5019 [00:03<32:03, 2.60it/s]
0%|▍ | 11/5019 [00:04<31:42, 2.63it/s]
0%|▍ | 11/5019 [00:04<32:29, 2.57it/s
can you heip me please?

@Ugness
Copy link
Owner

Ugness commented Nov 27, 2020

That problem happened from the tqdm module.
I do not know the exact solution, but I recommend you to

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