# Add some new tensorflow ops

**URL:** <https://discuss.tvm.apache.org/t/add-some-new-tensorflow-ops/8217>\
**Category:** RFC\
**Created:** [October 20, 2020, 9:53am UTC](https://discuss.tvm.apache.org/t/add-some-new-tensorflow-ops/8217 "2020-10-20T09:53:38Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![alter-xp](https://discuss.tvm.apache.org/user_avatar/discuss.tvm.apache.org/alter-xp/32/2102_2.png) [@alter-xp](https://discuss.tvm.apache.org/u/alter-xp)\
**Post date:** [October 20, 2020, 9:53am UTC](https://discuss.tvm.apache.org/t/add-some-new-tensorflow-ops/8217/1 "2020-10-20T09:53:38Z")

</div>

## Motivation

In order to enrich the support of TF operator and the need of practical work, we add 15 operators to TVM. as follows: \* Expm1, Rint, Softsign, Cumprod, Cumsum \* SegmentMax, SegmentMin, SegmentMean, SegmentPord, SegmentSum \* UnsortedSegmentMax, UnsortedSegmentMin, UnsortedSegmentMean \* UnsortedSegmentPord, UnsortedSegmentSum

## Implementation Details

1. **Expm1** [https://tensorflow.google.cn/api\_docs/python/tf/math/expm1](https://tensorflow.google.cn/api_docs/python/tf/math/expm1) ![image](https://discuss.tvm.apache.org/uploads/default/original/2X/3/360c4a1c3b03a7fda6a99db43924786b11f6f306.png)
2. **Softsign** [https://tensorflow.google.cn/api\_docs/python/tf/nn/softsign](https://tensorflow.google.cn/api_docs/python/tf/nn/softsign) ![image](https://discuss.tvm.apache.org/uploads/default/original/2X/8/85ff3050bbca22aaf34f9995bbc7d093c8819724.png)
3. **Rint** [https://tensorflow.google.cn/api\_docs/python/tf/math/rint](https://tensorflow.google.cn/api_docs/python/tf/math/rint)
4. **Cumprod** [https://tensorflow.google.cn/api\_docs/python/tf/math/cumprod](https://tensorflow.google.cn/api_docs/python/tf/math/cumprod)
5. **Cumsum** [https://tensorflow.google.cn/api\_docs/python/tf/math/cumsum](https://tensorflow.google.cn/api_docs/python/tf/math/cumsum)
6. **SegmentMax** [https://tensorflow.google.cn/api\_docs/python/tf/math/segment\_max](https://tensorflow.google.cn/api_docs/python/tf/math/segment_max)
7. **SegmentMin** [https://tensorflow.google.cn/api\_docs/python/tf/math/segment\_min](https://tensorflow.google.cn/api_docs/python/tf/math/segment_min)
8. **SegmentMean** [https://tensorflow.google.cn/api\_docs/python/tf/math/segment\_mean](https://tensorflow.google.cn/api_docs/python/tf/math/segment_mean)
9. **SegmentPord** [https://tensorflow.google.cn/api\_docs/python/tf/math/segment\_prod](https://tensorflow.google.cn/api_docs/python/tf/math/segment_prod)
10. **SegmentSum** [https://tensorflow.google.cn/api\_docs/python/tf/math/segment\_sum](https://tensorflow.google.cn/api_docs/python/tf/math/segment_sum)
11. **UnsortedSegmentMax** [https://tensorflow.google.cn/api\_docs/python/tf/math/unsorted\_segment\_max](https://tensorflow.google.cn/api_docs/python/tf/math/unsorted_segment_max)
12. **UnsortedSegmentMin** [https://tensorflow.google.cn/api\_docs/python/tf/math/unsorted\_segment\_min](https://tensorflow.google.cn/api_docs/python/tf/math/unsorted_segment_min)
13. **UnsortedSegmentMean** [https://tensorflow.google.cn/api\_docs/python/tf/math/unsorted\_segment\_mean](https://tensorflow.google.cn/api_docs/python/tf/math/unsorted_segment_mean)
14. **UnsortedSegmentProd** [https://tensorflow.google.cn/api\_docs/python/tf/math/unsorted\_segment\_prod](https://tensorflow.google.cn/api_docs/python/tf/math/unsorted_segment_prod)
15. **UnsortedSegmentSum** [https://tensorflow.google.cn/api\_docs/python/tf/math/unsorted\_segment\_sum](https://tensorflow.google.cn/api_docs/python/tf/math/unsorted_segment_sum)

In TF frontend, exmp1 composed by exp and subtraction. Softsign composed by abs and divide. Rint replaced by round. We provide a new implementation for Cumsum, Cumprod, SegmentMax, SegmentMin, SegmentMean, SegmentProd, and SegmentSum operators. For the UnsortedSegment operators, they share a set of implementation with Segment operators. The conversion is completed in TF frontend.

@Huyuwei @hlu1 @kazum @siju-samuel @FrozenGene

---

_[View the full topic](https://discuss.tvm.apache.org/t/add-some-new-tensorflow-ops/8217)._
