Coder Social home page Coder Social logo

How do I test the picture about keras-fcn HOT 7 CLOSED

 avatar commented on July 17, 2024
How do I test the picture

from keras-fcn.

Comments (7)

JihongJu avatar JihongJu commented on July 17, 2024

@pyziq Could you please provide your code, and training log?

from keras-fcn.

 avatar commented on July 17, 2024

@JihongJu
Thank you for reply

The code is:

`from keras_fcn import FCN
from keras.preprocessing import image
from keras.models import load_model
import numpy as np

model = load_model('fcn_vgg16.h5')
img = image.load_img('cat.jpg', target_size=(500, 500))
x = image.img_to_array(img)
x = np.expand_dims(x, axis=0)
preds =model.predict(x)
print preds`

and get the answer like this:
image

the traning logs:
I get the loss:1.92e-07 acc:0.7435 val_acc:0.7432
Is the loss too small?

from keras-fcn.

JihongJu avatar JihongJu commented on July 17, 2024

@pyziq Hmm, that's interesting. Would you mind to share with me a copy of your trained model? Otherwise, it may take a few days for me to reproduce this bug. My email address is [email protected].

from keras-fcn.

 avatar commented on July 17, 2024

@JihongJu

I have sent the trained model.
Thank you very much!

from keras-fcn.

JihongJu avatar JihongJu commented on July 17, 2024

@pyziq Sorry for the late reply. I just added a callback function to determine which layer the nans arise. It seems score_feat2 was the problem in my case. I am still debugging what was happening. Maybe you can also debug for what's happening in your case, with the new added keras_fcn.callbacks.CheckNumericsOps

from keras-fcn.

 avatar commented on July 17, 2024

Thank you for reply, I will try it

from keras-fcn.

JihongJu avatar JihongJu commented on July 17, 2024

Hi @pyziq, it turns out that the problem was caused by the lack of an activation layer on top of the last output layer. Now it is fixed.

from keras-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.