File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
src/TensorFlowNET.Core/Variables Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -122,13 +122,13 @@ private VariableScope _enter_scope_uncached()
122122
123123 if ( ! string . IsNullOrEmpty ( _name ) || _scope != null )
124124 {
125- var name_scope = _scope . name . Split ( '/' ) . Last ( ) ;
125+ var name_scope = _scope == null ? _name : _scope . name . Split ( '/' ) . Last ( ) ;
126126 if ( current_name_scope == null )
127127 current_name_scope = ops . name_scope ( name_scope ) ;
128128 current_name_scope . __enter__ ( ) ;
129- var current_name_scope_name = current_name_scope ;
129+ string current_name_scope_name = current_name_scope ;
130130 _current_name_scope = current_name_scope ;
131- string old_name_scope = _scope . original_name_scope ;
131+ string old_name_scope = _scope == null ? current_name_scope_name : _scope . original_name_scope ;
132132
133133 if ( _scope == null )
134134 pure_variable_scope = new PureVariableScope ( _name , old_name_scope : old_name_scope ) ;
You can’t perform that action at this time.
0 commit comments