Git Product home page Git Product logo

Comments (5)

sapnii2 avatar sapnii2 commented on May 27, 2024

You got any solution for ValueError? I am with same error please help.
Thanks

from brain-tumor-segmentation.

latestgo avatar latestgo commented on May 27, 2024

I got any solution for ValueError.
If you want to train the model from scratch, the parameter load_model_resume_training shoud be None.
If you train the model from the pretrained weights provided by @Issam28, the parameter load_model_resume_training shoud be pretrained weights filepath without extension and code

self.model =load_model(load_model_resume_training,custom_objects={'gen_dice_loss': gen_dice_loss,'dice_whole_metric':dice_whole_metric,'dice_core_metric':dice_core_metric,'dice_en_metric':dice_en_metric})

change to

self.model = self.load_model(load_model_resume_training)
sgd = SGD(lr=0.08, momentum=0.9, decay=5e-6, nesterov=False)
self.model.compile(loss=gen_dice_loss, optimizer=sgd, metrics=[dice_whole_metric,dice_core_metric,dice_en_metric])

from brain-tumor-segmentation.

muween avatar muween commented on May 27, 2024

I got any solution for ValueError.
If you want to train the model from scratch, the parameter load_model_resume_training shoud be None.
If you train the model from the pretrained weights provided by @Issam28, the parameter load_model_resume_training shoud be pretrained weights filepath without extension and code

self.model =load_model(load_model_resume_training,custom_objects={'gen_dice_loss': gen_dice_loss,'dice_whole_metric':dice_whole_metric,'dice_core_metric':dice_core_metric,'dice_en_metric':dice_en_metric})

change to

self.model = self.load_model(load_model_resume_training)
sgd = SGD(lr=0.08, momentum=0.9, decay=5e-6, nesterov=False)
self.model.compile(loss=gen_dice_loss, optimizer=sgd, metrics=[dice_whole_metric,dice_core_metric,dice_en_metric])

The load_model function needs '{ }.json', but I didn't find it

from brain-tumor-segmentation.

latestgo avatar latestgo commented on May 27, 2024

I got any solution for ValueError.
If you want to train the model from scratch, the parameter load_model_resume_training shoud be None.
If you train the model from the pretrained weights provided by @Issam28, the parameter load_model_resume_training shoud be pretrained weights filepath without extension and code

self.model =load_model(load_model_resume_training,custom_objects={'gen_dice_loss': gen_dice_loss,'dice_whole_metric':dice_whole_metric,'dice_core_metric':dice_core_metric,'dice_en_metric':dice_en_metric})

change to

self.model = self.load_model(load_model_resume_training)
sgd = SGD(lr=0.08, momentum=0.9, decay=5e-6, nesterov=False)
self.model.compile(loss=gen_dice_loss, optimizer=sgd, metrics=[dice_whole_metric,dice_core_metric,dice_en_metric])

The load_model function needs '{ }.json', but I didn't find it

Hello, hope it's not too late.
The json file can be produced by function save_model in object Train.

from brain-tumor-segmentation.

qiuyuan666 avatar qiuyuan666 commented on May 27, 2024

Hello, I used your solution(change self.model) and ran into this problem as well:No such file or directory: '*******/pretrained_weights/ResUnet.epoch_02.hdf5.json'
I don't understand you said "The json file can be produced by function save_model in object Train.", Can you elaborate a bit more on how to solve this problem?
Thank you very much! I am looking forward to your reply.

from brain-tumor-segmentation.

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.