| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 1958036 commit ba49010
432 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -63,8 +63,8 @@ public struct DeallocatorArgs | |||
| 63 | 63 | ||
| 64 | 64 | static unsafe DeallocatorArgs() | |
| 65 | 65 | { | |
| 66 | - Empty = new IntPtr(EmptyPtr = (DeallocatorArgs*) Marshal.AllocHGlobal(Marshal.SizeOf<DeallocatorArgs>())); | ||
| 67 | - *EmptyPtr = new DeallocatorArgs() {gc_handle = IntPtr.Zero, deallocator_called = false}; | ||
| 66 | + Empty = new IntPtr(EmptyPtr = (DeallocatorArgs*)Marshal.AllocHGlobal(Marshal.SizeOf<DeallocatorArgs>())); | ||
| 67 | + *EmptyPtr = new DeallocatorArgs() { gc_handle = IntPtr.Zero, deallocator_called = false }; | ||
| 68 | 68 | } | |
| 69 | 69 | ||
| 70 | 70 | public bool deallocator_called; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -15,7 +15,6 @@ limitations under the License. | |||
| 15 | 15 | ******************************************************************************/ | |
| 16 | 16 | ||
| 17 | 17 | using NumSharp; | |
| 18 | - using System; | ||
| 19 | 18 | using System.Collections.Generic; | |
| 20 | 19 | using System.Diagnostics; | |
| 21 | 20 | using System.Linq; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -15,7 +15,6 @@ limitations under the License. | |||
| 15 | 15 | ******************************************************************************/ | |
| 16 | 16 | ||
| 17 | 17 | using Tensorflow.Graphs; | |
| 18 | - using Tensorflow.Operations; | ||
| 19 | 18 | ||
| 20 | 19 | namespace Tensorflow | |
| 21 | 20 | { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -14,8 +14,6 @@ You may obtain a copy of the License at | |||
| 14 | 14 | limitations under the License. | |
| 15 | 15 | ******************************************************************************/ | |
| 16 | 16 | ||
| 17 | - using NumSharp; | ||
| 18 | - | ||
| 19 | 17 | namespace Tensorflow | |
| 20 | 18 | { | |
| 21 | 19 | public partial class tensorflow | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -14,9 +14,7 @@ You may obtain a copy of the License at | |||
| 14 | 14 | limitations under the License. | |
| 15 | 15 | ******************************************************************************/ | |
| 16 | 16 | ||
| 17 | - using System; | ||
| 18 | 17 | using System.Collections.Generic; | |
| 19 | - using Tensorflow.Contexts; | ||
| 20 | 18 | using static Tensorflow.Binding; | |
| 21 | 19 | ||
| 22 | 20 | namespace Tensorflow | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -15,7 +15,6 @@ limitations under the License. | |||
| 15 | 15 | ******************************************************************************/ | |
| 16 | 16 | ||
| 17 | 17 | using System; | |
| 18 | - using static Tensorflow.Binding; | ||
| 19 | 18 | ||
| 20 | 19 | namespace Tensorflow | |
| 21 | 20 | { | |
@@ -42,19 +41,19 @@ public Tensor cond(Tensor pred, | |||
| 42 | 41 | public Operation group<T>(T[] inputs, string name = null) where T : ITensorOrOperation | |
| 43 | 42 | => control_flow_ops.group(inputs, name: name); | |
| 44 | 43 | ||
| 45 | - public Tensor while_loop(Func<Tensor, Tensor> cond, | ||
| 46 | - Func<Tensor, Tensor> body, | ||
| 44 | + public Tensor while_loop(Func<Tensor, Tensor> cond, | ||
| 45 | + Func<Tensor, Tensor> body, | ||
| 47 | 46 | Tensor loop_vars, | |
| 48 | 47 | int parallel_iterations = 10) | |
| 49 | 48 | { | |
| 50 | - Func<Tensor[], Tensor> cond1 = x | ||
| 49 | + Func<Tensor[], Tensor> cond1 = x | ||
| 51 | 50 | => cond(x[0]); | |
| 52 | 51 | ||
| 53 | - Func<Tensor[], Tensor[]> body1 = x | ||
| 52 | + Func<Tensor[], Tensor[]> body1 = x | ||
| 54 | 53 | => new[] { body(x[0]) }; | |
| 55 | 54 | ||
| 56 | - var results = control_flow_ops.while_loop(cond1, | ||
| 57 | - body1, | ||
| 55 | + var results = control_flow_ops.while_loop(cond1, | ||
| 56 | + body1, | ||
| 58 | 57 | new[] { loop_vars }); | |
| 59 | 58 | return results[0]; | |
| 60 | 59 | } | |
@@ -68,7 +67,7 @@ public Tensor[] while_loop(Func<Tensor[], Tensor> cond, | |||
| 68 | 67 | parallel_iterations: parallel_iterations, | |
| 69 | 68 | name: name); | |
| 70 | 69 | ||
| 71 | - public _ControlDependenciesController control_dependencies(ITensorOrOperation[] control_inputs) | ||
| 70 | + public _ControlDependenciesController control_dependencies(ITensorOrOperation[] control_inputs) | ||
| 72 | 71 | => ops.control_dependencies(control_inputs); | |
| 73 | 72 | } | |
| 74 | 73 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -14,8 +14,6 @@ You may obtain a copy of the License at | |||
| 14 | 14 | limitations under the License. | |
| 15 | 15 | ******************************************************************************/ | |
| 16 | 16 | ||
| 17 | - using NumSharp; | ||
| 18 | - | ||
| 19 | 17 | namespace Tensorflow | |
| 20 | 18 | { | |
| 21 | 19 | public partial class tensorflow | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -14,8 +14,6 @@ You may obtain a copy of the License at | |||
| 14 | 14 | limitations under the License. | |
| 15 | 15 | ******************************************************************************/ | |
| 16 | 16 | ||
| 17 | - using System; | ||
| 18 | - | ||
| 19 | 17 | namespace Tensorflow | |
| 20 | 18 | { | |
| 21 | 19 | public partial class tensorflow | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -34,10 +34,10 @@ public Tensor assert_equal<T1, T2>(T1 t1, | |||
| 34 | 34 | object[] data = null, | |
| 35 | 35 | string message = null, | |
| 36 | 36 | string name = null) | |
| 37 | - => check_ops.assert_equal(t1, | ||
| 38 | - t2, | ||
| 39 | - data: data, | ||
| 40 | - message: message, | ||
| 37 | + => check_ops.assert_equal(t1, | ||
| 38 | + t2, | ||
| 39 | + data: data, | ||
| 40 | + message: message, | ||
| 41 | 41 | name: name); | |
| 42 | 42 | ||
| 43 | 43 | public Tensor assert_greater_equal<T1, T2>(Tensor x, | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -40,11 +40,11 @@ public Tensor[] gradients(Tensor[] ys, | |||
| 40 | 40 | int? aggregation_method = null, | |
| 41 | 41 | Tensor[] stop_gradients = null) | |
| 42 | 42 | { | |
| 43 | - return gradients_util._GradientsHelper(ys, | ||
| 44 | - xs, | ||
| 45 | - grad_ys, | ||
| 46 | - name, | ||
| 47 | - colocate_gradients_with_ops, | ||
| 43 | + return gradients_util._GradientsHelper(ys, | ||
| 44 | + xs, | ||
| 45 | + grad_ys, | ||
| 46 | + name, | ||
| 47 | + colocate_gradients_with_ops, | ||
| 48 | 48 | gate_gradients, | |
| 49 | 49 | stop_gradients: stop_gradients); | |
| 50 | 50 | } | |
| Back | FazBrowse Home | New Git URL |
0 commit comments