Skip to content

tangent * tangent and dot(tangent, tangent) can return tangents. #643

@lukas-weber

Description

@lukas-weber

I noticed that there are methods of * and dot for the AbstractZero types that work like

Base.:*(::NoTangent, ::NoTangent) = NoTangent()
LinearAlgebra.dot(::NoTangent, ::ZeroTangent) = ZeroTangent()

However, if both arguments are tangents,

  1. * should not be defined.
  2. dot should return a real number, not another tangent.

In my understanding, code that relies on such nonlinear tangent to tangent operations cannot be correct, so it may be worthwhile to remove such methods.

Metadata

Metadata

Assignees

No one assigned

    Labels

    breakinga breaking change

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions