mirror of
https://github.com/wassname/ray.git
synced 2026-07-04 21:04:35 +08:00
Add support for tensorflow resource variables (#4438)
* Adding support for resource variables Currently resource variable go undetected by the `TensorFlowVariables` since they do not use the same ops for reading values. This change should fix this until a more robust solution is implemented. * fix varhandle
This commit is contained in:
@@ -76,7 +76,8 @@ class TensorFlowVariables(object):
|
||||
if control not in explored_inputs:
|
||||
queue.append(control)
|
||||
explored_inputs.add(control)
|
||||
if "Variable" in tf_obj.node_def.op:
|
||||
if ("Variable" in tf_obj.node_def.op
|
||||
or "VarHandle" in tf_obj.node_def.op):
|
||||
variable_names.append(tf_obj.node_def.name)
|
||||
self.variables = OrderedDict()
|
||||
variable_list = [
|
||||
|
||||
Reference in New Issue
Block a user