| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 6119bd1 commit a3795c8
28 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,3 +1,3 @@ | |||
| 1 | - TensorFlow.NET logo (c) 2019 by Meinrad Recheis. | ||
| 2 | - | ||
| 1 | + TensorFlow.NET logo (c) 2019 by Meinrad Recheis. | ||
| 2 | + | ||
| 3 | 3 | The logo is based on the original Tensorflow logo which is copyrighted by the respective creator. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,17 +1,17 @@ | |||
| 1 | - /***************************************************************************** | ||
| 2 | - Copyright 2018 The TensorFlow.NET Authors. All Rights Reserved. | ||
| 3 | - | ||
| 4 | - Licensed under the Apache License, Version 2.0 (the "License"); | ||
| 5 | - you may not use this file except in compliance with the License. | ||
| 6 | - You may obtain a copy of the License at | ||
| 7 | - | ||
| 8 | - http://www.apache.org/licenses/LICENSE-2.0 | ||
| 9 | - | ||
| 10 | - Unless required by applicable law or agreed to in writing, software | ||
| 11 | - distributed under the License is distributed on an "AS IS" BASIS, | ||
| 12 | - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| 13 | - See the License for the specific language governing permissions and | ||
| 14 | - limitations under the License. | ||
| 1 | + /***************************************************************************** | ||
| 2 | + Copyright 2018 The TensorFlow.NET Authors. All Rights Reserved. | ||
| 3 | + | ||
| 4 | + Licensed under the Apache License, Version 2.0 (the "License"); | ||
| 5 | + you may not use this file except in compliance with the License. | ||
| 6 | + You may obtain a copy of the License at | ||
| 7 | + | ||
| 8 | + http://www.apache.org/licenses/LICENSE-2.0 | ||
| 9 | + | ||
| 10 | + Unless required by applicable law or agreed to in writing, software | ||
| 11 | + distributed under the License is distributed on an "AS IS" BASIS, | ||
| 12 | + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| 13 | + See the License for the specific language governing permissions and | ||
| 14 | + limitations under the License. | ||
| 15 | 15 | ******************************************************************************/ | |
| 16 | 16 | ||
| 17 | 17 | using System.Collections.Generic; | |
@@ -77,8 +77,8 @@ public _ControlDependenciesController control_dependencies(ITensorOrOperation[] | |||
| 77 | 77 | /// | |
| 78 | 78 | /// Use with the `with` keyword to specify that all operations constructed | |
| 79 | 79 | /// within the context should have control dependencies on | |
| 80 | - /// `control_inputs`. | ||
| 81 | - /// </summary> | ||
| 80 | + /// `control_inputs`. | ||
| 81 | + /// </summary> | ||
| 82 | 82 | public _ControlDependenciesController control_dependencies(object[] control_inputs) | |
| 83 | 83 | { | |
| 84 | 84 | if (control_inputs == null) | |
@@ -92,20 +92,20 @@ public _ControlDependenciesController control_dependencies(object[] control_inpu | |||
| 92 | 92 | // TODO: implement IndexedSlices | |
| 93 | 93 | //case IndexedSlices islice: | |
| 94 | 94 | // control_ops.Add(islice.op); | |
| 95 | - // break; | ||
| 95 | + // break; | ||
| 96 | 96 | case Tensor t: | |
| 97 | 97 | control_ops.Add(t.op); | |
| 98 | 98 | break; | |
| 99 | 99 | case Operation op: | |
| 100 | 100 | control_ops.Add(op); | |
| 101 | - break; | ||
| 101 | + break; | ||
| 102 | 102 | default: | |
| 103 | 103 | var t1 = _as_graph_element(c); | |
| 104 | 104 | if (t1 == null) | |
| 105 | 105 | throw new TypeError($"Control input must be Operation or Tensor:{c}"); | |
| 106 | 106 | control_ops.Add(t1.op); | |
| 107 | - break; | ||
| 108 | - } | ||
| 107 | + break; | ||
| 108 | + } | ||
| 109 | 109 | } | |
| 110 | 110 | return new _ControlDependenciesController(this, control_ops); | |
| 111 | 111 | } | |
@@ -138,9 +138,9 @@ public void _pop_control_dependencies_controller(_ControlDependenciesController | |||
| 138 | 138 | _control_dependencies_stack.RemoveAt(_control_dependencies_stack.Count-1); | |
| 139 | 139 | } | |
| 140 | 140 | ||
| 141 | - /// <summary> | ||
| 142 | - /// Record that the given op depends on all registered control dependencies. | ||
| 143 | - /// </summary> | ||
| 141 | + /// <summary> | ||
| 142 | + /// Record that the given op depends on all registered control dependencies. | ||
| 143 | + /// </summary> | ||
| 144 | 144 | public void _record_op_seen_by_control_dependencies(Operation op) | |
| 145 | 145 | { | |
| 146 | 146 | foreach (var controller in _control_dependencies_stack) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,17 +1,17 @@ | |||
| 1 | - /***************************************************************************** | ||
| 2 | - Copyright 2018 The TensorFlow.NET Authors. All Rights Reserved. | ||
| 3 | - | ||
| 4 | - Licensed under the Apache License, Version 2.0 (the "License"); | ||
| 5 | - you may not use this file except in compliance with the License. | ||
| 6 | - You may obtain a copy of the License at | ||
| 7 | - | ||
| 8 | - http://www.apache.org/licenses/LICENSE-2.0 | ||
| 9 | - | ||
| 10 | - Unless required by applicable law or agreed to in writing, software | ||
| 11 | - distributed under the License is distributed on an "AS IS" BASIS, | ||
| 12 | - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| 13 | - See the License for the specific language governing permissions and | ||
| 14 | - limitations under the License. | ||
| 1 | + /***************************************************************************** | ||
| 2 | + Copyright 2018 The TensorFlow.NET Authors. All Rights Reserved. | ||
| 3 | + | ||
| 4 | + Licensed under the Apache License, Version 2.0 (the "License"); | ||
| 5 | + you may not use this file except in compliance with the License. | ||
| 6 | + You may obtain a copy of the License at | ||
| 7 | + | ||
| 8 | + http://www.apache.org/licenses/LICENSE-2.0 | ||
| 9 | + | ||
| 10 | + Unless required by applicable law or agreed to in writing, software | ||
| 11 | + distributed under the License is distributed on an "AS IS" BASIS, | ||
| 12 | + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| 13 | + See the License for the specific language governing permissions and | ||
| 14 | + limitations under the License. | ||
| 15 | 15 | ******************************************************************************/ | |
| 16 | 16 | ||
| 17 | 17 | using System; | |
@@ -38,8 +38,8 @@ public OpDef GetOpDef(string type) | |||
| 38 | 38 | public OperationDescription NewOperation(string opType, string opName) | |
| 39 | 39 | { | |
| 40 | 40 | return c_api.TF_NewOperation(_handle, opType, opName); | |
| 41 | - } | ||
| 42 | - | ||
| 41 | + } | ||
| 42 | + | ||
| 43 | 43 | public Operation[] ReturnOperations(IntPtr results) | |
| 44 | 44 | { | |
| 45 | 45 | TF_Operation return_oper_handle = new TF_Operation(); | |
@@ -89,14 +89,14 @@ public Operation OperationByName(string operName) | |||
| 89 | 89 | public ITensorOrOperation[] get_operations() | |
| 90 | 90 | { | |
| 91 | 91 | return _nodes_by_name.Values.ToArray(); | |
| 92 | - } | ||
| 93 | - | ||
| 92 | + } | ||
| 93 | + | ||
| 94 | 94 | /// <summary> | |
| 95 | 95 | /// Returns the `Operation` with the given `name`. | |
| 96 | 96 | /// | |
| 97 | - /// This method may be called concurrently from multiple threads. | ||
| 98 | - /// </summary> | ||
| 99 | - /// <param name="name">The name of the `Operation` to return.</param> | ||
| 97 | + /// This method may be called concurrently from multiple threads. | ||
| 98 | + /// </summary> | ||
| 99 | + /// <param name="name">The name of the `Operation` to return.</param> | ||
| 100 | 100 | public Operation get_operation_by_name(string name) | |
| 101 | 101 | => as_graph_element(name, allow_tensor: false, allow_operation: true) as Operation; | |
| 102 | 102 | ||
@@ -109,8 +109,8 @@ public ITensorOrOperation _get_operation_by_tf_operation(IntPtr tf_oper) | |||
| 109 | 109 | { | |
| 110 | 110 | var op_name = Marshal.PtrToStringAnsi(c_api.TF_OperationName(tf_oper)); | |
| 111 | 111 | return _get_operation_by_name_unsafe(op_name); | |
| 112 | - } | ||
| 113 | - | ||
| 112 | + } | ||
| 113 | + | ||
| 114 | 114 | /// <summary> | |
| 115 | 115 | /// Creates an `Operation` in this graph from the supplied TF_Operation. | |
| 116 | 116 | /// | |
@@ -125,7 +125,7 @@ public ITensorOrOperation _get_operation_by_tf_operation(IntPtr tf_oper) | |||
| 125 | 125 | /// </summary> | |
| 126 | 126 | /// <param name="c_op">a wrapped TF_Operation</param> | |
| 127 | 127 | /// <param name="compute_device">(Optional.) If True, device functions will be executed | |
| 128 | - /// to compute the device property of the Operation.</param> | ||
| 128 | + /// to compute the device property of the Operation.</param> | ||
| 129 | 129 | /// <returns>An `Operation` object.</returns> | |
| 130 | 130 | public Operation _create_op_from_tf_operation(IntPtr c_op, bool compute_device = true) | |
| 131 | 131 | { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments