Coder Social home page Coder Social logo

RuntimeError: Given groups=1, weight of size [64, 3, 3, 3], expected input[2, 224, 224, 3] to have 3 channels, but got 224 channels instead about contour-detection-pytorch HOT 5 CLOSED

kulkarnikeerti avatar kulkarnikeerti commented on August 21, 2024
RuntimeError: Given groups=1, weight of size [64, 3, 3, 3], expected input[2, 224, 224, 3] to have 3 channels, but got 224 channels instead

from contour-detection-pytorch.

Comments (5)

captanlevi avatar captanlevi commented on August 21, 2024

Hello, you need your images to be in the 3D shape.
As in not (224,224) but (1,224,224).
Reshaping can resolve your issue.

Other than that as there is a little interest in this project. I will be launching a new code with new features in the next few days.

from contour-detection-pytorch.

kulkarnikeerti avatar kulkarnikeerti commented on August 21, 2024

@captanlevi Thanks, that helped.
And thanks for letting me know about the new features. I suppose the new features will be added in the same repository, or will there be a new repository for that?

And just one last question about this model. I am getting negative loss values. Do you have any suggestions for this? or is this a normal behavior?
Thanks

from contour-detection-pytorch.

captanlevi avatar captanlevi commented on August 21, 2024

I will work in the same repo, for the negative loss perhaps you have not normalised the images ?

from contour-detection-pytorch.

kulkarnikeerti avatar kulkarnikeerti commented on August 21, 2024

Yeah, I haven't normalized the images. I am using albumentations for augmentation and I tried to normalize it in the same way. But this didn't help.

Just to clarify, is this how you normalize the images in this code? or I missed that part of code? Because I use the same values for normalization in albumentations but that didn't help me.

# image_res = norm_op(image_res)

from contour-detection-pytorch.

kulkarnikeerti avatar kulkarnikeerti commented on August 21, 2024

Okay. I figured it out. Thanks:)

from contour-detection-pytorch.

Related Issues (15)

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.