kwargs not supported
See original GitHub issueThis 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 to keras_applications.get_submodules_from_kwargs
function
https://github.com/qubvel/segmentation_models/blob/6fecc720be66d8b2bfb2b70105ee6fa5c99826d6/segmentation_models/models/unet.py#L211
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: https://github.com/qubvel/segmentation_models/blob/6fecc720be66d8b2bfb2b70105ee6fa5c99826d6/segmentation_models/models/unet.py#L226
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 helpfull
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (3 by maintainers)
@JonnoFTW Do not import Unet from
.models
, look at example in readmeI’m using the latest code from github and get an error later on about
backend
beingNoneType
. I got it working with: