Giter Site home page Giter Site logo

Comments (6)

psinger avatar psinger commented on September 27, 2024 5

Might have figured it out myself, dimension should be multiples of 32.

from segmentation_models.pytorch.

julienguegan avatar julienguegan commented on September 27, 2024

@psinger I have also noticed that when training Unet ... Do you know why ? Is it specific to Unet or is it the same with other architecture ?

from segmentation_models.pytorch.

JulienMaille avatar JulienMaille commented on September 27, 2024

@qubvel this question comes over an over, any idea if a better error message could be thrown? Or could we pad them to avoid this?

@julienguegan images needs to be a multiple of 2^depth because they will go through subsampling depth times (with rounding), before being up-sampled and concatenated in the skip connections.
In the example above :

 525 ---------------> 544
   \                  /
   263 -----------> 272
     \              /
     132 -------> 136
       \          /
       66 -----> 68
         \      /
         33 -> 34 !
           \  /
            17

You can see the concatenation will fail Sizes of tensors must match except in dimension 1. Got 33 and 34 in dimension 3

from segmentation_models.pytorch.

qubvel avatar qubvel commented on September 27, 2024

It is possible to add abstract _check_input method for SegmentationModel and implement it for different models

from segmentation_models.pytorch.

qubvel avatar qubvel commented on September 27, 2024

Or change unet upsampling, instead of factor specify shape for interpolation

from segmentation_models.pytorch.

qubvel avatar qubvel commented on September 27, 2024

Such kind of upsamplig have been chosen to simplify conversion between different frameworks, not sure that all of them support shape upsampling

from segmentation_models.pytorch.

Related Issues (20)

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.