You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
作者您好,您的论文和代码工作相当出色,当我在调试代码过程中遇到了问题,需要您的指点,希望您能回复我的问题,非常感谢
Traceback (most recent call last):
File "/home/huangbo/CD_Code/2022-RS-EGCTNet/EGCTNet_pytorch-main/main_cd.py", line 83, in
train(args)
File "/home/huangbo/CD_Code/2022-RS-EGCTNet/EGCTNet_pytorch-main/main_cd.py", line 14, in train
model.train_models()
File "/home/huangbo/CD_Code/2022-RS-EGCTNet/EGCTNet_pytorch-main/models/trainer.py", line 342, in train_models
self._backward_G()
File "/home/huangbo/CD_Code/2022-RS-EGCTNet/EGCTNet_pytorch-main/models/trainer.py", line 315, in _backward_G
self.G_loss = self._pxl_loss(self.G_pred[-1], gt, self.G_pred[-2], gt_edge)
File "/home/huangbo/anaconda3/envs/pytorch1.8/lib/python3.8/site-packages/torch/nn/modules/module.py", line 889, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/huangbo/CD_Code/2022-RS-EGCTNet/EGCTNet_pytorch-main/models/losses.py", line 278, in forward
loss_c = cross_entropy(inputs, target)
File "/home/huangbo/CD_Code/2022-RS-EGCTNet/EGCTNet_pytorch-main/models/losses.py", line 19, in cross_entropy
input = F.interpolate(input, size=target.shape[1:], mode='bilinear',align_corners=True)
File "/home/huangbo/anaconda3/envs/pytorch1.8/lib/python3.8/site-packages/torch/nn/functional.py", line 3472, in interpolate
raise ValueError(
ValueError: size shape must match input shape. Input is 2D, size is 4
The text was updated successfully, but these errors were encountered:
作者您好,您的论文和代码工作相当出色,当我在调试代码过程中遇到了问题,需要您的指点,希望您能回复我的问题,非常感谢
Traceback (most recent call last):
File "/home/huangbo/CD_Code/2022-RS-EGCTNet/EGCTNet_pytorch-main/main_cd.py", line 83, in
train(args)
File "/home/huangbo/CD_Code/2022-RS-EGCTNet/EGCTNet_pytorch-main/main_cd.py", line 14, in train
model.train_models()
File "/home/huangbo/CD_Code/2022-RS-EGCTNet/EGCTNet_pytorch-main/models/trainer.py", line 342, in train_models
self._backward_G()
File "/home/huangbo/CD_Code/2022-RS-EGCTNet/EGCTNet_pytorch-main/models/trainer.py", line 315, in _backward_G
self.G_loss = self._pxl_loss(self.G_pred[-1], gt, self.G_pred[-2], gt_edge)
File "/home/huangbo/anaconda3/envs/pytorch1.8/lib/python3.8/site-packages/torch/nn/modules/module.py", line 889, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/huangbo/CD_Code/2022-RS-EGCTNet/EGCTNet_pytorch-main/models/losses.py", line 278, in forward
loss_c = cross_entropy(inputs, target)
File "/home/huangbo/CD_Code/2022-RS-EGCTNet/EGCTNet_pytorch-main/models/losses.py", line 19, in cross_entropy
input = F.interpolate(input, size=target.shape[1:], mode='bilinear',align_corners=True)
File "/home/huangbo/anaconda3/envs/pytorch1.8/lib/python3.8/site-packages/torch/nn/functional.py", line 3472, in interpolate
raise ValueError(
ValueError: size shape must match input shape. Input is 2D, size is 4
The text was updated successfully, but these errors were encountered: