Code Monkey home page Code Monkey logo

Comments (6)

aymericdamien avatar aymericdamien commented on June 28, 2024 3

@MarvinTeichmann that indeed looks really great! It would definitely be useful for our users. Do not hesitate to send us a pull request :) Just my suggestion is to move the 'semantic segmentation loss' to 'objectives.py' file instead of 'losses.py' file, and change 'logits'/'labels' arguments name to 'y_pred'/'y_true', for consistency with other objective functions.

@FreakTheMighty You can go ahead, thanks!

from tensorflow-fcn.

MarvinTeichmann avatar MarvinTeichmann commented on June 28, 2024

Thanks for the hint and good idea. I have implemented the upscore_layer and the semantic segmentation loss to tflearn. Can you have a short look at it? I have no experience with tflearn. Needed to do some changed to fit in to the framework but have cannot test whether it works now.

Thanks in advance! If you approve my code, I will open a pull request.

from tensorflow-fcn.

FreakTheMighty avatar FreakTheMighty commented on June 28, 2024

@MarvinTeichmann wow, that was fast :D. I can take a closer look tonight, but I think it makes sense to open a pull request sooner rather than later. The maintainer, @aymericdamien, of tflearn will be able to give the most substantive feedback.

I only get a few hours a day to work on these things, but I'd like to contribute an example that recreates the FCN using tflearn and your new layers and loss.

from tensorflow-fcn.

FreakTheMighty avatar FreakTheMighty commented on June 28, 2024

@aymericdamien I've started working on porting @MarvinTeichmann networks here. MarvinTeichmann/tflearn#1 I'm sure I will get stuck along the way, but I think it will be good experience.

One thing I noticed about the weak_cross_entropy_2d_loss objective is that it takes more than two arguments where tflearn objectives are passed as strings into the solver. How would that interface work in tflearn?

from tensorflow-fcn.

aymericdamien avatar aymericdamien commented on June 28, 2024

Yes, because of the extra argument, it cannot directly be called as a string argument in regression layer, however, loss argument can be a function, so it could be something like:

def my_loss(y_pred, y_true):
  return tflearn.weak_cross_entropy_2d_loss(y_pred, y_true, num_classes=10)
net = ...
net = tflearn.regression(net, loss=my_loss)

Another approach would be to remove num_classes argument and calculate it automatically by checking dimension of y_true. So passing just

net = ...
net = tflearn.regression(net, loss='weak_cross_entropy_2d_loss')

will work

from tensorflow-fcn.

MarvinTeichmann avatar MarvinTeichmann commented on June 28, 2024

Merged in tflearn/tflearn#137.

from tensorflow-fcn.

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.