Skip to content

Unrecognized keyword arguments passed to SeparableConv2D: {'kernel_regularizer': <keras.src.regularizers.regularizers.L2 object at 0x7d9e8ec71b10>} #165

@meirashaf

Description

@meirashaf

Previously, I had the same issue and were solved by this answer, but it raises a new issue

Traceback (most recent call last):
  File "/content/face_classification/src/train_emotion_classifier.py", line 39, in <module>
    model = mini_XCEPTION(input_shape, num_classes)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/content/face_classification/src/models/cnn.py", line 226, in mini_XCEPTION
    x = SeparableConv2D(16, (3, 3), padding='same',
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/keras/src/layers/convolutional/separable_conv2d.py", line 122, in __init__
    super().__init__(
  File "/usr/local/lib/python3.11/dist-packages/keras/src/layers/convolutional/base_separable_conv.py", line 104, in __init__
    super().__init__(
  File "/usr/local/lib/python3.11/dist-packages/keras/src/layers/layer.py", line 285, in __init__
    raise ValueError(
ValueError: Unrecognized keyword arguments passed to SeparableConv2D: {'kernel_regularizer': <keras.src.regularizers.regularizers.L2 object at 0x7d9e8ec71b10>}

I tried to train the model in google colab, so i did a few adjustment in the dependencies file REQUIREMENTS.txt

keras==2.0.5
tensorflow
pandas
numpy==1.12.1
h5py
statistics
opencv-python
scikit-imag
imageio

What should I do? #115

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions