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
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