Support for reduced mean
Adds support the reduce_mean operation in tensorflow. Consider the example: For inputs: Tensor of shape(s0,s1,s2,s3) reduction axes = [0,3] We generate the following program: If keep_dim == true output is of shape(1,s1,s2,1) else output is of shape(s1,s2) for i1=[0:s1] for i2=[0:s2] sum = 0 for i0=[0:s0] for i3=[0:s3] sum = sum + input[i0][i1][i2][i3] output[i1][i2] = sum / (s0 * s3) // keep_dim=false OR output[0][i1][i2][0] = sum / (s0 * s3) // keep_dim=true TODO: Also add support for reduced sum.
Showing
- Athos/SeeDot/AST/AST.py 3 additions, 4 deletionsAthos/SeeDot/AST/AST.py
- Athos/SeeDot/AST/ASTVisitor.py 0 additions, 2 deletionsAthos/SeeDot/AST/ASTVisitor.py
- Athos/SeeDot/AST/MtdAST.py 0 additions, 1 deletionAthos/SeeDot/AST/MtdAST.py
- Athos/SeeDot/AST/PrintAST.py 0 additions, 2 deletionsAthos/SeeDot/AST/PrintAST.py
- Athos/SeeDot/IR/IRBuilderCSF.py 126 additions, 24 deletionsAthos/SeeDot/IR/IRBuilderCSF.py
- Athos/SeeDot/Optimizations/LivenessOpti.py 1 addition, 1 deletionAthos/SeeDot/Optimizations/LivenessOpti.py
- Athos/TFCompiler/TFNodesAST.py 19 additions, 7 deletionsAthos/TFCompiler/TFNodesAST.py
Loading
Please register or sign in to comment