TensorFlow why we still use tf.name_scope when we already have the function tf.variable_scope
You can use tf.variable_scope to add a prefix on both variables created with tf.get_variable and operations: as you said, this allows also variable sharing but it also makes the first call to tf.get_variable the definition of new variable under this scope.
tf.name_scope adds a prefix only at the operations: variables defined outside the tf.name_scope using tf.get_variable are not prefixed thus the tf.name_scope is ignored completely for this variable: you're not declarning a variable prefixed in any way.
This can be useful when you want to create an operation block (using tf.name_scope) that uses a variable declared outside of it. This variable can be even used by multiple operation blocks at the same time.
I do not understand why we also need the function tf.name_scope when we already have tf.variable_scope. From the Tensorflow official API, I see that the tf.variable_scope is more powerful because it can have an effect on tf.get_variable. When we create layers and want to share variables, we always use tf.variable_scope and tf.name_scope. However, I try to learn something new from code released by Nvidia on GitHub. I found that it is frequent for coders to use tf.name_scope. Why do we still need this function?