-
Notifications
You must be signed in to change notification settings - Fork 136
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
when I run the main.py .I have this problem and can't solve it,anyone can help me? #11
Comments
I guess you did n’t expand your input to four dimensions, your 0 dimension should be batchsize, if you only have one image, it should be 0 |
你解决了吗,我出现了这样的问题 Process finished with exit code 1 |
您好,请问您这个问题解决了吗?谢谢! |
我也遇到了相同的问题 |
D:\python\envs\pytorch\python.exe E:/FFA-Net-master/net/main.py
Namespace(blocks=20, bs=16, crop=False, crop_size=240, device='cpu', eval_step=5000, gps=3, lr=0.0001, model_dir='./trained_models/its_train_ffa_3_20.pk', net='ffa', no_lr_sche=False, perloss=False, resume=True, steps=100000, testset='its_test', trainset='its_train')
model_dir: ./trained_models/its_train_ffa_3_20.pk
16
E:\FFA-Net-master\net
crop size whole_img
crop size whole img
crop size whole_img
crop size whole img
log_dir : logs/its_train_ffa_3_20
model_name: its_train_ffa_3_20
train from scratch ***
Traceback (most recent call last):
File "E:/FFA-Net-master/net/main.py", line 156, in
train(net,loader_train,loader_test,optimizer,criterion)
File "E:/FFA-Net-master/net/main.py", line 62, in train
x,y=next(iter(loader_train))
File "D:\python\envs\pytorch\lib\site-packages\torch\utils\data\dataloader.py", line 346, in next
data = self._dataset_fetcher.fetch(index) # may raise StopIteration
File "D:\python\envs\pytorch\lib\site-packages\torch\utils\data_utils\fetch.py", line 47, in fetch
return self.collate_fn(data)
File "D:\python\envs\pytorch\lib\site-packages\torch\utils\data_utils\collate.py", line 79, in default_collate
return [default_collate(samples) for samples in transposed]
File "D:\python\envs\pytorch\lib\site-packages\torch\utils\data_utils\collate.py", line 79, in
return [default_collate(samples) for samples in transposed]
File "D:\python\envs\pytorch\lib\site-packages\torch\utils\data_utils\collate.py", line 55, in default_collate
return torch.stack(batch, 0, out=out)
RuntimeError: invalid argument 0: Sizes of tensors must match except in dimension 0. Got 460 and 407 in dimension 2 at C:\w\1\s\tmp_conda_3.6_081743\conda\conda-bld\pytorch_1572941935551\work\aten\src\TH/generic/THTensor.cpp:689
Process finished with exit code 1
The text was updated successfully, but these errors were encountered: