Skip to content

Commit 6201aa8

Browse files
committed
Add license to TF# files and ifdef to make them build
1 parent 989e61b commit 6201aa8

File tree

3 files changed

+14
-27
lines changed

3 files changed

+14
-27
lines changed

src/Microsoft.ML.TensorFlow/Buffer.cs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
//
2-
// TensorFlow.cs; Bindings to the TensorFlow C API for .NET
3-
//
4-
// Authors:
5-
// Miguel de Icaza (miguel@microsoft.com)
6-
//
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
3+
// See the LICENSE file in the project root for more information.
4+
75
using System;
86
using System.Runtime.InteropServices;
97
using System.Text;

src/Microsoft.ML.TensorFlow/Tensor.cs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
//
2-
// TensorFlow.cs; Bindings to the TensorFlow C API for .NET
3-
//
4-
// Authors:
5-
// Miguel de Icaza (miguel@microsoft.com)
6-
//
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
3+
// See the LICENSE file in the project root for more information.
4+
75
using System;
86
using System.Collections;
97
using System.Collections.Generic;

src/Microsoft.ML.TensorFlow/Tensorflow.cs

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,7 @@
1-
//
2-
// TensorFlow.cs; Bindings to the TensorFlow C API for .NET
3-
//
4-
// Authors:
5-
// Miguel de Icaza (miguel@microsoft.com)
6-
//
7-
// Strongly typed API
8-
// The API generally takes a TF_Status that defaults to null, if the value is null, on error, this raises an exception, otherwise, the error is returned on the TF_Status.
9-
// You can use TFStatus.Default for a value to use when you do not want to create the value yourself and are ok reusing the value.
10-
//
11-
// Guidaance on doing language bindings for Tensorflow:
12-
// https://www.tensorflow.org/versions/r0.11/how_tos/language_bindings/
13-
//
14-
//
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
3+
// See the LICENSE file in the project root for more information.
4+
155
using System;
166
using System.Runtime.InteropServices;
177
using System.Text;
@@ -3045,6 +3035,7 @@ public TFTensor [] PartialRun (PartialRunToken token, TFOutput [] inputs, TFTens
30453035
return result;
30463036
}
30473037

3038+
#if TF_OPS
30483039
/// <summary>
30493040
/// Restores a tensor from a serialized tensorflor file.
30503041
/// </summary>
@@ -3102,7 +3093,7 @@ public TFTensor [] SaveTensors (string filename, params ValueTuple<string, TFOut
31023093
null, IntPtr.Zero));
31033094
}).ToArray ()), tensors.Select (d => d.Item2).ToArray ())).Run ();
31043095
}
3105-
3096+
#endif // TF_OPS
31063097
}
31073098

31083099
/// <summary>

0 commit comments

Comments
 (0)