forked from SciSharp/TensorFlow.NET
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtf.math.cs
More file actions
40 lines (35 loc) · 986 Bytes
/
Copy pathtf.math.cs
File metadata and controls
40 lines (35 loc) · 986 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
using System;
using System.Collections.Generic;
using System.Text;
namespace Tensorflow
{
public static partial class tf
{
public static Tensor add(Tensor a, Tensor b)
{
return gen_math_ops.add(a, b);
}
public static Tensor sub(Tensor a, Tensor b)
{
return gen_math_ops.sub(a, b);
}
public static Tensor multiply(Tensor x, Tensor y)
{
return gen_math_ops.mul(x, y);
}
public static Tensor pow(Tensor x, double y)
{
return gen_math_ops.pow(x, y);
}
/// <summary>
/// Computes the sum of elements across dimensions of a tensor.
/// </summary>
/// <param name="input"></param>
/// <param name="axis"></param>
/// <returns></returns>
public static Tensor reduce_sum(Tensor input, int[] axis = null)
{
return math_ops.reduce_sum(input);
}
}
}