Skip to content

Problem with segmentation model #191

@tombinic

Description

@tombinic

I want to use this package with my Unet for segmentation but I receive this error:

File "/usr/local/lib/python3.11/dist-packages/tf_explain/core/grad_cam.py", line 52, in explain layer_name = self.infer_grad_cam_target_layer(model) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/dist-packages/tf_explain/core/grad_cam.py", line 86, in infer_grad_cam_target_layer if len(layer.output_shape) == 4: ^^^^^^^^^^^^^^^^^^ AttributeError: 'Conv2D' object has no attribute 'output_shape'

How can I fix it?
Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions