Exemplo n.º 1
0
            public void __enter__()
            {
                if (tf.Context.executing_eagerly())
                {
                    (scope_name, old_scope_name) = enter_eager_name_scope(tf.Context, _name);
                }
                else
                {
                    _name = _name ?? _default_name;
                    Graph g = null;

                    if (_values is List <Tensor> vList)
                    {
                        g = _get_graph_from_inputs(vList.ToArray());
                    }
                    else if (_values is Tensor[] vArray)
                    {
                        g = _get_graph_from_inputs(vArray);
                    }

                    if (g == null)
                    {
                        g = get_default_graph();
                    }

                    old_scope_name = g._name_stack;
                    scope_name     = g.name_scope(_name);
                }
            }
Exemplo n.º 2
0
            public void __enter__()
            {
                _name = _name ?? _default_name;
                if (_name.EndsWith("basic_r_n_n_cell"))
                {
                }
                Graph g = null;

                if (_values is List <Tensor> vList)
                {
                    g = _get_graph_from_inputs(vList.ToArray());
                }
                else if (_values is Tensor[] vArray)
                {
                    g = _get_graph_from_inputs(vArray);
                }

                if (g == null)
                {
                    g = get_default_graph();
                }

                old_stack   = g._name_stack;
                _name_scope = g.name_scope(_name);
            }
Exemplo n.º 3
0
            public void __enter__()
            {
                _name = _name == null ? _default_name : _name;

                Graph g = null;

                if (_values is List <Tensor> values)
                {
                    g = _get_graph_from_inputs(values);
                }

                if (g == null)
                {
                    g = get_default_graph();
                }

                old_stack   = g._name_stack;
                _name_scope = g.name_scope(_name);
            }
Exemplo n.º 4
0
            public void __enter__()
            {
                if (String.IsNullOrEmpty(_name))
                {
                    _name = _default_name;
                }

                Graph g = null;

                if (_values is List <Tensor> values)
                {
                    g = _get_graph_from_inputs(values);
                }

                if (g == null)
                {
                    g = get_default_graph();
                }

                _name_scope = g.name_scope(_name);
            }
Exemplo n.º 5
0
            public void __enter__()
            {
                _name = _name == null ? _default_name : _name;

                Graph g = null;

                if (_values is List <Tensor> vList)
                {
                    g = _get_graph_from_inputs(vList.ToArray());
                }
                else if (_values is Tensor[] vArray)
                {
                    g = _get_graph_from_inputs(vArray);
                }

                if (g == null)
                {
                    g = get_default_graph();
                }

                old_stack   = g._name_stack;
                _name_scope = g.name_scope(_name);
            }