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); }
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)); }
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; }
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; }
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))); }
public Engine.DataType GetDataType(DataType x) { throw new NotImplementedException(); }
public void Dispose(DataType x) { throw new NotImplementedException(); }
public Array GetArray(DataType x) { throw new NotImplementedException(); }
public DataType Col2Im(DataType cols, long[] x_shape, Tuple <int, int> kernalSize, int padding = 1, int stride = 1) { throw new NotImplementedException(); }
public DataType L2Normalize(DataType x, int axis = -1) { throw new NotImplementedException(); }
public DataType Diag(DataType x) { throw new NotImplementedException(); }
public float Mean(DataType x) { throw new NotImplementedException(); }
public DataType Clip(DataType x, float min, float max) { throw new NotImplementedException(); }
public DataType Square(DataType x) { throw new NotImplementedException(); }
public DataType Pow(DataType x, float value) { throw new NotImplementedException(); }
public long[] GetShape(DataType x) { throw new NotImplementedException(); }
public DataType Dot(DataType a, DataType b) { throw new NotImplementedException(); }
public DataType Mean(DataType x, int dim) { throw new NotImplementedException(); }
public DataType Softplus(DataType x, int axis = -1) { throw new NotImplementedException(); }
public DataType Mean(DataType x, params int[] dim) { throw new NotImplementedException(); }
public DataType Im2Col(DataType x, Tuple <int, int> kernalSize, int padding = 1, int stride = 1) { throw new NotImplementedException(); }
public DataType Argmin(DataType x, int dim = 0) { throw new NotImplementedException(); }
public DataType SliceCols(DataType x, long start, long end) { throw new NotImplementedException(); }
public DataType Maximum(DataType a, DataType b) { throw new NotImplementedException(); }
public object Eval(DataType x) { throw new NotImplementedException(); }
public DataType Minimum(DataType a, float b) { throw new NotImplementedException(); }
public void Print(DataType x, string title = "") { throw new NotImplementedException(); }
public DataType Transpose(DataType x) { throw new NotImplementedException(); }
public DataType Reshape(DataType x, params long[] shape) { throw new NotImplementedException(); }
public DataType Transpose(DataType x, params int[] dims) { throw new NotImplementedException(); }