Wrap ResourceVariable with MixedPrecisionVariable to support casting-reads; support that
in FastPathExecute. This is for incoming mixed precision training support. In mixed precision training, layer.add_weight() returns a _MixedPrecisionVariable wrapping a resource var, it should allow returning a tensor of potentially different dtype when read. (It's necessary to return a var instead of a tensor from add_weight() otherwise eager would break.) This CL adds necessary Python interface and makes it compatible with FastPathExecute. PiperOrigin-RevId: 203862791
Loading
Please sign in to comment