Git Product home page Git Product logo

Comments (7)

mingrui avatar mingrui commented on August 21, 2024

keras is a wrapper for tensorflow, turn on tensorflow as backend for keras and start from there?

from 3dunetcnn.

jamespeterthornton avatar jamespeterthornton commented on August 21, 2024

The most noteworthy change is to switch the axis of concatenation to the last channel instead of the first. This is because Theano is channels_first but Tensorflow is channels_last. E.g. change 'concatenate([up5, conv3], axis=1)' to 'concatenate([up5, conv3], axis=4)'. Otherwise, things can generally stay the same.

from 3dunetcnn.

Zerseu avatar Zerseu commented on August 21, 2024

Could you please elaborate more on the changes needed to use TensorFlow as backend?
I have applied the fix above, setting axis=4, but am getting this message when trying to run:

ValueError: Error when checking input: expected input_1 to have shape (None, 64, 64, 32, 1) but got array with shape (1, 1, 64, 64, 32)

from 3dunetcnn.

Zerseu avatar Zerseu commented on August 21, 2024

I think it's from "data.py", function "add_data_to_storage". Any help would be appreciated.

from 3dunetcnn.

ellisdg avatar ellisdg commented on August 21, 2024

To use Tensorflow as a backend, you don't need to change any of the code. Simply follow the instructions listed in the Keras backend documentation.

from 3dunetcnn.

mingrui avatar mingrui commented on August 21, 2024

Tested with

KERAS_BACKEND=tensorflow python train.py

Works well

from 3dunetcnn.

stale avatar stale commented on August 21, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. If you have questions, feel free to join the Slack group or email me at [email protected].

from 3dunetcnn.

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.