コード例 #1
0
ファイル: TOps.cs プロジェクト: SciSharp/TensorSharp
        public static NDArray Maximum(float a, NDArray b)
        {
            var a_t = new NDArray(b.Allocator, b.ElementType, b.Shape);

            TOps.Fill(a_t, a);
            return(Maximum(a_t, b));
        }
コード例 #2
0
ファイル: Tensor.cs プロジェクト: awesomedotnetcore/SiaNet
        public static Tensor Constant(float value, IAllocator allocator, DType dtype, params long[] sizes)
        {
            Tensor tensor = new Tensor(allocator, dtype, sizes);

            TOps.Fill(tensor, value);
            return(tensor);
        }
コード例 #3
0
ファイル: TOps.cs プロジェクト: SciSharp/TensorSharp
        public static NDArray Maximum(NDArray a, float b)
        {
            var b_t = new NDArray(a.Allocator, a.ElementType, a.Shape);

            TOps.Fill(b_t, b);
            return(Maximum(a, b_t));
        }
コード例 #4
0
        public static Tensor Maximum(float a, Tensor b)
        {
            var a_t = new Tensor(b.Allocator, b.ElementType, b.Shape);

            TOps.Fill(a_t, a);
            return(Maximum(a_t, b));
        }
コード例 #5
0
        public static Tensor Maximum(Tensor a, float b)
        {
            var b_t = new Tensor(a.Allocator, a.ElementType, a.Shape);

            TOps.Fill(b_t, b);
            return(Maximum(a, b_t));
        }
コード例 #6
0
ファイル: NDArray.cs プロジェクト: SciSharp/TensorSharp
        public static NDArray Constant(float value, IAllocator allocator, DType dtype, params long[] sizes)
        {
            NDArray tensor = new NDArray(allocator, dtype, sizes);

            TOps.Fill(tensor, value);
            return(tensor);
        }
コード例 #7
0
ファイル: Tensor.cs プロジェクト: awesomedotnetcore/SiaNet
 public void Fill(float value)
 {
     TOps.Fill(this, value);
 }