Commit 542ec6d4 authored by Eugene Brevdo's avatar Eugene Brevdo Committed by TensorFlower Gardener
Browse files

[TF optimizers (v1)] Non-slot variables are ResourceVariables iff the input vars are.

This fixes a bug where Adam beta*_power variables were always created as RefVars
even if the optimizer acts on ResourceVars.  This broke certain defun + Adam
use cases.

Also fixed the unit tests, which *always* created ResourceVariables
(ever since variables.Variable() constructor became aliased to ResourceVariables).

PiperOrigin-RevId: 224869338
parent c0627e1f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment