示例#1
0
        public Engine.DataType GetDataType(SiaTensor x)
        {
            switch (In(x).dtype)
            {
            case TF_DataType.DtInvalid:
                break;

            case TF_DataType.TF_FLOAT:
                return(Engine.DataType.Float32);

            case TF_DataType.TF_DOUBLE:
                return(Engine.DataType.Float64);

            case TF_DataType.TF_INT32:
                return(Engine.DataType.Int32);

            case TF_DataType.TF_UINT8:
                return(Engine.DataType.Int8);

            case TF_DataType.TF_INT8:
                return(Engine.DataType.Int8);

            default:
                return(Engine.DataType.Float32);
            }

            return(Engine.DataType.Float32);
        }
示例#2
0
        public SiaTensor Mean(SiaTensor x, params int[] dims)
        {
            for (int i = 0; i < dims.Length; i++)
            {
                dims[i] = dims[i] < 0 ? x.DimCount + dims[i] : dims[i];
            }

            return Out(math_ops.reduce_mean(In(x), dims, true));
        }
示例#3
0
        public SiaTensor Min(SiaTensor x, params int[] dims)
        {
            for (int i = 0; i < dims.Length; i++)
            {
                dims[i] = dims[i] < 0 ? x.DimCount + dims[i] : dims[i];
                x = Min(x, dims[i]);
            }

            return x;
        }
示例#4
0
        public SiaTensor Sum(SiaTensor x, params int[] dims)
        {
            foreach (var item in dims)
            {
                int dim = item < 0 ? x.DimCount + item : item;
                x = Sum(x, item);
            }

            return x;
        }
示例#5
0
        public SiaTensor Tile(SiaTensor x, int n, int axis = 0)
        {
            axis = axis < 0 ? x.DimCount + axis : axis;
            int[] multiples = new int[x.DimCount];
            for(int i=0;i<multiples.Length;i++)
            {
                if(i == axis)
                {
                    multiples[i] = n;
                    continue;
                }

                multiples[i] = 1;
            }
            
            return Out(tf.tile(In(x), In(multiples)));
        }
示例#6
0
 public Engine.DataType GetDataType(DataType x)
 {
     throw new NotImplementedException();
 }
示例#7
0
 public void Dispose(DataType x)
 {
     throw new NotImplementedException();
 }
示例#8
0
 public Array GetArray(DataType x)
 {
     throw new NotImplementedException();
 }
示例#9
0
 public DataType Col2Im(DataType cols, long[] x_shape, Tuple <int, int> kernalSize, int padding = 1, int stride = 1)
 {
     throw new NotImplementedException();
 }
示例#10
0
 public DataType L2Normalize(DataType x, int axis = -1)
 {
     throw new NotImplementedException();
 }
示例#11
0
 public DataType Diag(DataType x)
 {
     throw new NotImplementedException();
 }
示例#12
0
 public float Mean(DataType x)
 {
     throw new NotImplementedException();
 }
示例#13
0
 public DataType Clip(DataType x, float min, float max)
 {
     throw new NotImplementedException();
 }
示例#14
0
 public DataType Square(DataType x)
 {
     throw new NotImplementedException();
 }
示例#15
0
 public DataType Pow(DataType x, float value)
 {
     throw new NotImplementedException();
 }
示例#16
0
 public long[] GetShape(DataType x)
 {
     throw new NotImplementedException();
 }
示例#17
0
 public DataType Dot(DataType a, DataType b)
 {
     throw new NotImplementedException();
 }
示例#18
0
 public DataType Mean(DataType x, int dim)
 {
     throw new NotImplementedException();
 }
示例#19
0
 public DataType Softplus(DataType x, int axis = -1)
 {
     throw new NotImplementedException();
 }
示例#20
0
 public DataType Mean(DataType x, params int[] dim)
 {
     throw new NotImplementedException();
 }
示例#21
0
 public DataType Im2Col(DataType x, Tuple <int, int> kernalSize, int padding = 1, int stride = 1)
 {
     throw new NotImplementedException();
 }
示例#22
0
 public DataType Argmin(DataType x, int dim = 0)
 {
     throw new NotImplementedException();
 }
示例#23
0
 public DataType SliceCols(DataType x, long start, long end)
 {
     throw new NotImplementedException();
 }
示例#24
0
 public DataType Maximum(DataType a, DataType b)
 {
     throw new NotImplementedException();
 }
示例#25
0
 public object Eval(DataType x)
 {
     throw new NotImplementedException();
 }
示例#26
0
 public DataType Minimum(DataType a, float b)
 {
     throw new NotImplementedException();
 }
示例#27
0
 public void Print(DataType x, string title = "")
 {
     throw new NotImplementedException();
 }
示例#28
0
 public DataType Transpose(DataType x)
 {
     throw new NotImplementedException();
 }
示例#29
0
 public DataType Reshape(DataType x, params long[] shape)
 {
     throw new NotImplementedException();
 }
示例#30
0
 public DataType Transpose(DataType x, params int[] dims)
 {
     throw new NotImplementedException();
 }