Git Product home page Git Product logo

Comments (7)

htt1994 avatar htt1994 commented on June 2, 2024

And the shape of X_ins is (?, 128, 128, 1), the shape of y_ins is (?, 128, 128, 3), and the shape of tensor is (?, 128, 128, 3).

from multiplanarunet.

htt1994 avatar htt1994 commented on June 2, 2024

The model is
image

from multiplanarunet.

perslev avatar perslev commented on June 2, 2024

Hi!

Your y_ins should be of shape (?, 128, 128, 1) with each entry giving an integer-valued label. That is, values in {0, 1, 2} in your case for a 3-class problem. I would expect that you have your label maps stored in one-hot encoding (which would be normal, but not what is used here).

I am, however, surprised that you did not get a more appropriate error message - so perhaps this is not the error. I will look into it later this week as soon as I have more time.

If this does solve your issue let me know.

from multiplanarunet.

htt1994 avatar htt1994 commented on June 2, 2024

Hi! Thank you for your reply! One thing I did not mention. I changed slightly your code in the callbacks.py
(y_ins = {in_tens: in_ for in_tens, in_ in zip(self.model.targets, y)} --> y_ins = {in_tens: in_ for in_tens, in_ in zip(self.model.output, y)}),
due to the error "Unet object has no attribute 'targets' "

from multiplanarunet.

htt1994 avatar htt1994 commented on June 2, 2024

Hi! I think I understand it. The problem is the code of callbacks.py:
'y_ins = {in_tens: in_ for in_tens, in_ in zip(self.model.targets, y)}', because I changed 'targets'(,,,1) to 'outputs'(,,,2) for binary segmentation.
However, I still do not know the placeholder variable name of y_ins due to the error "Unet object has no attribute 'targets' ".

Best Wishes,
Tao H

from multiplanarunet.

htt1994 avatar htt1994 commented on June 2, 2024

Hi! Maybe I solved the problem. I replaced 'targets' with '_targets' and it works. However, I do not known if it is true.
image
Best Wishes,
Tao H

from multiplanarunet.

perslev avatar perslev commented on June 2, 2024

Hi,

Please update to the latest version (0.2.4) with TensorFlow >=2.0. If you still receive this error, please raise a new issue.

Cheers,
Mathias

from multiplanarunet.

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.