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