GithubHelp home page GithubHelp logo

egctnet_pytorch's Issues

调试main_cd.py中出现ValueError: size shape must match input shape. Input is 2D, size is 4

作者您好,您的论文和代码工作相当出色,当我在调试代码过程中遇到了问题,需要您的指点,希望您能回复我的问题,非常感谢
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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.