/***************************************************************************** Copyright 2018 The TensorFlow.NET Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ******************************************************************************/ using System; using System.Collections.Generic; namespace Tensorflow { public partial class tensorflow { public void add_to_collection(string name, T value) => get_default_graph().add_to_collection(name, value); public void add_to_collections(List names, T value) => get_default_graph().add_to_collections(names, value); public Tensor assign(Tensor @ref, object value, bool validate_shape = true, bool use_locking = true, string name = null) => state_ops.assign(@ref, value, validate_shape, use_locking, name); public Tensor assign(RefVariable @ref, object value, bool validate_shape = true, bool use_locking = true, string name = null) => state_ops.assign(@ref, value, validate_shape, use_locking, name); public void device(string device_name) => get_default_graph().device(device_name); public List get_collection(string key, string scope = "") => get_default_graph().get_collection(key, scope: scope); /// /// A context manager that lifts ops out of control-flow scopes and function-building graphs. /// public void init_scope() => ops.init_scope(); /// /// Returns a context manager that creates hierarchical names for operations. /// /// The name argument that is passed to the op function. /// The default name to use if the name argument is None. /// The list of Tensor arguments that are passed to the op function. /// The scope name. public ops.NameScope name_scope(string name, string default_name = "", object values = null) => new ops.NameScope(name, default_name, values); /// /// Does nothing. Only useful as a placeholder for control edges. /// /// /// public Operation no_op(string name = null) => gen_control_flow_ops.no_op(name: name); /// /// map on the list of tensors unpacked from `elems` on dimension 0. /// /// /// /// /// /// /// /// /// /// A tensor or (possibly nested) sequence of tensors. public Tensor map_fn(Func fn, Tensor elems, TF_DataType dtype = TF_DataType.DtInvalid, int parallel_iterations = -1, bool back_prop = true, bool swap_memory = false, bool infer_shape = true, string name = null) => Operation.map_fn(fn, elems, dtype, parallel_iterations: parallel_iterations, back_prop: back_prop, swap_memory: swap_memory, infer_shape: infer_shape, name: name); } }