diff --git a/README.md b/README.md index 13cb4f63..42cd3ec4 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ Install TensorFlow.NET through NuGet. PM> Install-Package TensorFlow.NET ``` -If you are using Linux or Mac OS, please download the pre-compiled dll [here](tensorflow.so) and place it in the working folder. This is only need for Linux and Mac OS, and already packed into NuGet for Windows. +If you are using Linux or Mac OS, please download the pre-compiled dll [here](tensorflowlib) and place it in the working folder. This is only need for Linux and Mac OS, and already packed into NuGet for Windows. Import tensorflow.net. diff --git a/src/TensorFlowNET.Core/Framework/tf.ops.cs b/src/TensorFlowNET.Core/Framework/tf.ops.cs index a38caee4..1d5309ad 100644 --- a/src/TensorFlowNET.Core/Framework/tf.ops.cs +++ b/src/TensorFlowNET.Core/Framework/tf.ops.cs @@ -8,5 +8,16 @@ namespace Tensorflow { public static object get_collection(string key, string scope = "") => get_default_graph() .get_collection(key, scope: 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 static ops.name_scope name_scope(string name, + string default_name = "", + object values = null) => new ops.name_scope(name, default_name, values); } } diff --git a/src/TensorFlowNET.Core/Variables/RefVariable.Operators.cs b/src/TensorFlowNET.Core/Variables/RefVariable.Operators.cs index d7383d5f..5bd4120d 100644 --- a/src/TensorFlowNET.Core/Variables/RefVariable.Operators.cs +++ b/src/TensorFlowNET.Core/Variables/RefVariable.Operators.cs @@ -17,7 +17,7 @@ namespace Tensorflow private static Tensor op_helper(string default_name, RefVariable x, T y) { var tensor1 = x.value(); - return Python.with(new ops.name_scope(null, default_name, new object[] { tensor1, y }), scope => { + return with(new ops.name_scope(null, default_name, new { tensor1, y }), scope => { var tensor2 = ops.convert_to_tensor(y, tensor1.dtype.as_base_dtype(), "y"); return gen_math_ops.add(tensor1, tensor2, scope); }); diff --git a/src/TensorFlowNET.Core/Variables/VariableV1.cs b/src/TensorFlowNET.Core/Variables/VariableV1.cs index c94b3f90..27297a26 100644 --- a/src/TensorFlowNET.Core/Variables/VariableV1.cs +++ b/src/TensorFlowNET.Core/Variables/VariableV1.cs @@ -14,7 +14,7 @@ namespace Tensorflow /// the variable are fixed. The value can be changed using one of the assign methods. /// https://tensorflow.org/guide/variables /// - public class VariableV1 + public class VariableV1 : Python { public VariableV1(object initial_value = null, bool trainable = true, diff --git a/src/TensorFlowNET.Core/ops.name_scope.cs b/src/TensorFlowNET.Core/ops.name_scope.cs index 295ea89e..0b9bbf0f 100644 --- a/src/TensorFlowNET.Core/ops.name_scope.cs +++ b/src/TensorFlowNET.Core/ops.name_scope.cs @@ -7,6 +7,9 @@ namespace Tensorflow { public partial class ops { + /// + /// Returns a context manager that creates hierarchical names for operations. + /// public class name_scope : IPython { public string _name;