Scope is totally ignored.
The scope in graph is totally ignored when I try to get variables defined in a scope.
The scope input in following methods are ignored as a result there is now way to get variables per scope
//Graph.cs
public partial class Graph
{
public object get_collection(string name, string scope = null)..
public List<T> get_collection<T>(string name, string scope = null) ..
}
//tf.variable.cs
public partial class tensorflow
{
public IVariableV1[] trainable_variables(string scope = null)=> (variables.trainable_variables() as List<IVariableV1>).ToArray();
}
Please implement the use of scope or provide alternative. THNX
Hello, could you please provide some python code examples of the scope you tend to use?
In tensorflow python, there are many usages of with xxx as xx to declare a scope (or context). I couldn't see which scope to implement.
Hello,
The code bellow, gets same tensors from 2 networks to update values from DQNetwork to TargetNetwork.
def update_target_graph():
# Get the parameters of our DQNNetwork
from_vars = tf.get_collection(tf.GraphKeys.TRAINABLE_VARIABLES, "DQNetwork")
# Get the parameters of our Target_network
to_vars = tf.get_collection(tf.GraphKeys.TRAINABLE_VARIABLES, "TargetNetwork")
op_holder = []
# Update our target_network parameters with DQNNetwork parameters
for from_var,to_var in zip(from_vars,to_vars):
op_holder.append(to_var.assign(from_var))
return op_holder
THNX
@Oceania2018 What do you think of this feature? I'd like to try to implement it if there is no conflict with the current framework.