-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
kwargs not supported #230
Comments
Hi @bonlime |
I would be glad to fix it with your PR 👍 |
I'm passing |
I'm using the latest code from github and get an error later on about from keras import layers, utils, models
from segmentation_models.models import unet
model = unet.Unet('efficientnetb3', classes=num_classes, activation='softmax',
backend=K, layers=layers, utils=utils, models=models) |
@JonnoFTW Do not import Unet from |
qubvel
pushed a commit
that referenced
this issue
Apr 17, 2020
* Allow passing keyword arguments to backbone models * Rename function get_submodules_args to improve readability Co-authored-by: Peter Sluka <[email protected]>
lukfischer
added a commit
to SCCH-KVS/segmentation_models
that referenced
this issue
May 11, 2020
Allow passing keyword arguments to backbone models (qubvel#230) (qubvel#291)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This issue occurs for all models in the repo but i'll explain it in case of Unet
If you try to pass any additional arguments to
Unet
model, they get into**kwargs
and are passed tokeras_applications.get_submodules_from_kwargs
functionsegmentation_models/segmentation_models/models/unet.py
Line 211 in 6fecc72
which DOESN'T allow any extra arguments! and raises TypeError
https://github.com/keras-team/keras-applications/blob/71acdcd98088501247f4b514b7cbbdf8182a05a4/keras_applications/__init__.py#L13-L21
it makes the following line useless:
segmentation_models/segmentation_models/models/unet.py
Line 226 in 6fecc72
I think the easiest way to fix this issue is to write a custom
get_submodules_from_kwargs
function. I can make PR if you find it helpfullThe text was updated successfully, but these errors were encountered: