Commit c13703f2 authored by James Qin's avatar James Qin Committed by TensorFlower Gardener
Browse files

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
parent f4095e19
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment