agents icon indicating copy to clipboard operation
agents copied to clipboard

Duplicated weight name in networks.utils.mlp_layers

Open emailweixu opened this issue 6 years ago • 2 comments

The dense layers created in mlp_layers have same names: https://github.com/tensorflow/agents/blob/82317735484b99f8bcb6ec7cb99d1e73f058ca55/tf_agents/networks/utils.py#L172

Because of this, eager_utils.add_variables_summaries cannot generate summary for all the weights.

emailweixu avatar Apr 23 '19 20:04 emailweixu

Yeah, I actually just noticed this with V2 setups a day or two ago as well. It's an issue now that variables are not generated with unique names. They used to come from tf.Graph op names.

Looking at options to make them unique in V2.

oars avatar Apr 24 '19 15:04 oars

@oars, this problem persists even with tf2.0 rc1. Now it's not just the problem of ml_layers. EnocdingNetwork also has this problem since EncodingNetwork creates the layers itself, Do you have any problem to fix it? It's quite confusing when I want to actually examine the values and gradients of those layers.

emailweixu avatar Sep 22 '19 21:09 emailweixu