Skip to content

Add Weights needs a Samll Update #15

Open
@Gelesh

Description

@Gelesh

As I was running the MNIST Notebook, this is what I faced.

TypeError Traceback (most recent call last)
in <cell line: 0>()
----> 1 model = keras.Sequential(
2 [
3 keras.Input(shape=input_shape),
4 layers.Conv2D(32, kernel_size=(3, 3), activation="elu"),
5 Masksembles2D(4, 2.0), # adding Masksembles2D

6 frames
/usr/local/lib/python3.11/dist-packages/masksembles/keras.py in build(self, input_shape)
38 channels = input_shape[-1]
39 masks = common.generation_wrapper(channels, self.n, self.scale)
---> 40 self.masks = self.add_weight("masks",
41 shape=masks.shape,
42 trainable=False,

TypeError: Layer.add_weight() got multiple values for argument 'shape'.

This could be fixed with

<self.masks = self.add_weight("masks", ... > TO BE < self.masks = self.add_weight(name="masks", .. > in masksembles/common.py

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