Skip to content

'Operation' object has no attribute 'rematerialized_call' when using RematScope #23106

@buildwithsuhana

Description

@buildwithsuhana

When a keras.Operation (or a subclass that is not a Layer) is executed within a RematScope, it crashes with an AttributeError. This is because the Operation.call implementation attempts to call self.rematerialized_call, but that method is currently only defined in the Layer subclass, not in the base Operation class.

Reproduction script: https://colab.research.google.com/drive/1PuIB2GfMbGX087n7epQM6m-CSOXRVE_2?usp=sharing

Metadata

Metadata

Assignees

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