-
Notifications
You must be signed in to change notification settings - Fork 3
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
AssertionError: size of input tensor and input format are different. #5
Comments
As the error suggests, it might due to the format of the output is not compatible with the required format for tensorboard visualization. I will check and let you know. |
Thanks for your reply. I have been solved this problem .There is no bug about your code . |
Nice :) |
Thanks . Do you have any idea about my another problem of finetune ? I googled , but have not found solution. |
what is the problem? |
the new question released on your project PESR github . |
I also encountered the same problem. What is your solution? |
I also encountered the same problem, how to tackle it? |
@Aaradhy8989 @songyi1999, |
Hi ,thanks for your wonderful work .
When i retrained the work, I downloaded datasets and put them into data/origin dirctory.
Then i pretrained the code with command of python train.py --phase pretrain --learning_rate 1e-4.
However, it gave the error as follows:
Model check_point/my_model. Epoch [1/200]. Learning rate: 0.0001
100%|████████████████████████████████████████████████████████████████████████| 1000/1000 [04:41<00:00, 3.56it/s]
Finish train [1/200]. Loss: 8.88
Validating...
0%| | 0/10 [00:02<?, ?it/s]
Traceback (most recent call last):
File "train.py", line 314, in
main()
File "train.py", line 291, in main
update_tensorboard(epoch, tb, i, lr, sr, hr)
File "/home/18PESR-master/utils.py", line 47, in update_tensorboard
tb.add_image(str(img_idx) + '_LR', inp, epoch)
File "/home/anaconda3/lib/python3.5/site-packages/tensorboardX/writer.py", line 548, in add_image
image(tag, img_tensor, dataformats=dataformats), global_step, walltime)
File "/home/anaconda3/lib/python3.5/site-packages/tensorboardX/summary.py", line 211, in image
tensor = convert_to_HWC(tensor, dataformats)
File "/home/anaconda3/lib/python3.5/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, 3, 155, 103), input_format: CHW
Did you have any idea about this question?
Thanks .
Best regards.
The text was updated successfully, but these errors were encountered: