Consider the following Python 2 snippet written using TensorFlow
with tf.variable_scope('scope'):
layer = slim.conv2d(input_tensor, 64, 7, 2, padding='SAME', scope='another_scope')
I am creating a conv2d layer within a variable scope but am also passing another variable scope name explicitly to the constructor of the conv2d layer.
My questions are as follows:
- What will be the name of the variable
layerand in which scope would this variable be defined -scopeoranother_scope. - What is the use case for allowing users to declare variables like this?
- Is it possible to create nested variable scopes in TensorFlow? If yes, then how does it work?
- If scope
another_scopehasn't been created itself, would TensorFlow create this on its own?