Example #1
0
def tf_sum_ext(pb):
    return {
        'keep_dims': pb.attr["keep_dims"].b,
        'infer': lambda node: tf_reduce_infer(node)
    }
Example #2
0
def tf_reduce_prod_ext(pb):
    return {
        'keep_dims': pb.attr["keep_dims"].b,
        'infer': lambda node: tf_reduce_infer(node, op=np.multiply.reduce)
    }
Example #3
0
def tf_mean_ext(pb):
    return {
        'type': 'Pooling',
        'keep_dims': pb.attr["keep_dims"].b,
        'infer': lambda node: tf_reduce_infer(node, op=np.add.reduce)
    }