Browse Source

Fix CS1587 (XML comment is not placed on a valid language element)

pull/575/head
Sam Harwell 5 years ago
parent
commit
a0d27601e6
5 changed files with 20 additions and 21 deletions
  1. +1
    -2
      Directory.Build.props
  2. +4
    -4
      src/TensorFlowNET.Core/Gradients/gradients_util.cs
  3. +1
    -1
      src/TensorFlowNET.Core/Graphs/c_api.graph.cs
  4. +1
    -1
      src/TensorFlowNET.Core/Operations/Distributions/distribution.py.cs
  5. +13
    -13
      test/TensorFlowNET.UnitTest/Utilities/PrivateType.cs

+ 1
- 2
Directory.Build.props View File

@@ -18,9 +18,8 @@


CS1570: XML comment has badly formed XML CS1570: XML comment has badly formed XML
CS1572: XML comment has a param tag, but there is no parameter by that name CS1572: XML comment has a param tag, but there is no parameter by that name
CS1587: XML comment is not placed on a valid language element
--> -->
<NoWarn>$(NoWarn),1570,1572,1587</NoWarn>
<NoWarn>$(NoWarn),1570,1572</NoWarn>
</PropertyGroup> </PropertyGroup>


</Project> </Project>

+ 4
- 4
src/TensorFlowNET.Core/Gradients/gradients_util.cs View File

@@ -47,13 +47,13 @@ namespace Tensorflow
grad_ys = new Tensor[ys.Length]; grad_ys = new Tensor[ys.Length];


// Iterate over the collected ops. // Iterate over the collected ops.
/**
/*
* grads: op => list of gradients received on each output endpoint of the * grads: op => list of gradients received on each output endpoint of the
* op. The gradients for each endpoint are initially collected as a list. * op. The gradients for each endpoint are initially collected as a list.
* When it is time to call the op's gradient function, for each endpoint we * When it is time to call the op's gradient function, for each endpoint we
* aggregate the list of received gradients into a Add() Operation if there * aggregate the list of received gradients into a Add() Operation if there
* is more than one. * is more than one.
**/
*/
var grads = new Dictionary<string, List<List<Tensor>>>(); var grads = new Dictionary<string, List<List<Tensor>>>();
Operation[] reachable_to_ops = null; Operation[] reachable_to_ops = null;
ControlFlowState loop_state = null; ControlFlowState loop_state = null;
@@ -70,14 +70,14 @@ namespace Tensorflow
xs = ops.internal_convert_n_to_tensor_or_indexed_slices(xs, name: "x", as_ref: true); xs = ops.internal_convert_n_to_tensor_or_indexed_slices(xs, name: "x", as_ref: true);
grad_ys = _DefaultGradYs(grad_ys, ys, colocate_gradients_with_ops, gradient_uid); grad_ys = _DefaultGradYs(grad_ys, ys, colocate_gradients_with_ops, gradient_uid);


/**
/*
* The approach we take here is as follows: Create a list of all ops in the * The approach we take here is as follows: Create a list of all ops in the
* subgraph between the ys and xs. Visit these ops in reverse order of ids * subgraph between the ys and xs. Visit these ops in reverse order of ids
* to ensure that when we visit an op the gradients w.r.t its outputs have * to ensure that when we visit an op the gradients w.r.t its outputs have
* been collected. Then aggregate these gradients if needed, call the op's * been collected. Then aggregate these gradients if needed, call the op's
* gradient function, and add the generated gradients to the gradients for * gradient function, and add the generated gradients to the gradients for
* its input. * its input.
**/
*/


// Initialize the pending count for ops in the connected subgraph from ys // Initialize the pending count for ops in the connected subgraph from ys
// to the xs. // to the xs.


+ 1
- 1
src/TensorFlowNET.Core/Graphs/c_api.graph.cs View File

@@ -178,7 +178,7 @@ namespace Tensorflow
/// <summary> /// <summary>
/// Add an operation in `graph_def` to be returned via the `return_opers` output /// Add an operation in `graph_def` to be returned via the `return_opers` output
/// parameter of TF_GraphImportGraphDef(). `oper_name` is copied and has no /// parameter of TF_GraphImportGraphDef(). `oper_name` is copied and has no
// lifetime requirements.
/// lifetime requirements.
/// </summary> /// </summary>
/// <param name="opts">TF_ImportGraphDefOptions* opts</param> /// <param name="opts">TF_ImportGraphDefOptions* opts</param>
/// <param name="oper_name">const char*</param> /// <param name="oper_name">const char*</param>


+ 1
- 1
src/TensorFlowNET.Core/Operations/Distributions/distribution.py.cs View File

@@ -93,6 +93,7 @@ namespace Tensorflow
} }


/*
/// <summary> /// <summary>
/// Constructs the `Distribution' /// Constructs the `Distribution'
/// **This is a private method for subclass use.** /// **This is a private method for subclass use.**
@@ -113,7 +114,6 @@ namespace Tensorflow
/// <param name = "name"> Name prefixed to Ops created by this class. Default: subclass name.</param> /// <param name = "name"> Name prefixed to Ops created by this class. Default: subclass name.</param>
/// <returns> Two `Tensor` objects: `mean` and `variance`.</returns> /// <returns> Two `Tensor` objects: `mean` and `variance`.</returns>


/*
private Distribution ( private Distribution (
TF_DataType dtype, TF_DataType dtype,
ReparameterizationType reparameterization_type, ReparameterizationType reparameterization_type,


+ 13
- 13
test/TensorFlowNET.UnitTest/Utilities/PrivateType.cs View File

@@ -548,19 +548,19 @@ namespace Microsoft.VisualStudio.TestTools.UnitTesting
} }
} }


/// <summary>
/// The check parameter not null or empty.
/// </summary>
/// <param name="param">
/// The parameter.
/// </param>
/// <param name="parameterName">
/// The parameter name.
/// </param>
/// <param name="message">
/// The message.
/// </param>
/// <exception cref="ArgumentException"> Throws ArgumentException when parameter is null. </exception>
///// <summary>
///// The check parameter not null or empty.
///// </summary>
///// <param name="param">
///// The parameter.
///// </param>
///// <param name="parameterName">
///// The parameter name.
///// </param>
///// <param name="message">
///// The message.
///// </param>
///// <exception cref="ArgumentException"> Throws ArgumentException when parameter is null. </exception>
//internal static void CheckParameterNotNullOrEmpty(string param, string parameterName, string message) //internal static void CheckParameterNotNullOrEmpty(string param, string parameterName, string message)
//{ //{
// if (string.IsNullOrEmpty(param)) // if (string.IsNullOrEmpty(param))


Loading…
Cancel
Save