Skip to content

Commit 638d84e

Browse files
authored
Add variable scope to the name of the layer
Prepend the name of the variable scope to the name of the layer.
1 parent 788413b commit 638d84e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

tensorlayer/layers.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,7 @@ def __init__(
259259
name ='layer'
260260
):
261261
self.inputs = inputs
262+
name = tf.get_variable_scope().name + "/" + name
262263
if (name in set_keep['_layers_name_list']) and name_reuse == False:
263264
raise Exception("Layer '%s' already exists, please choice other 'name' or reuse this layer\
264265
\nHint : Use different name for different 'Layer' (The name is used to control parameter sharing)" % name)

0 commit comments

Comments
 (0)