# How to compile Caffe models

**URL:** <https://discuss.tvm.apache.org/t/how-to-compile-caffe-models/3422>\
**Category:** Questions\
**Created:** [July 22, 2019, 1:36am UTC](https://discuss.tvm.apache.org/t/how-to-compile-caffe-models/3422 "2019-07-22T01:36:21Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![heloise](https://discuss.tvm.apache.org/user_avatar/discuss.tvm.apache.org/heloise/32/854_2.png) [@heloise](https://discuss.tvm.apache.org/u/heloise)\
**Post date:** [July 22, 2019, 1:36am UTC](https://discuss.tvm.apache.org/t/how-to-compile-caffe-models/3422/1 "2019-07-22T01:36:21Z")

</div>

Hello, I need to compile caffe models with relay. I notice there is an API for Caffe2. Is there much difference between Caffe and Caffe2 models? Or I have to convert Caffe models to coreml models?

---

<div class="post-metadata">

**Author:** ![FrozenGene](https://discuss.tvm.apache.org/user_avatar/discuss.tvm.apache.org/frozengene/32/1114_2.png) [@FrozenGene](https://discuss.tvm.apache.org/u/FrozenGene)\
**Post date:** [July 22, 2019, 2:10am UTC](https://discuss.tvm.apache.org/t/how-to-compile-caffe-models/3422/2 "2019-07-22T02:10:24Z")

</div>

you should convert it into ONNX / CoreML and so on supported by TVM. However, I encourage you to implement Caffe frontend in TVM.

---

<div class="post-metadata">

**Author:** ![Lyken17](https://discuss.tvm.apache.org/user_avatar/discuss.tvm.apache.org/lyken17/32/711_2.png) [@Lyken17](https://discuss.tvm.apache.org/u/Lyken17)\
**Post date:** [July 22, 2019, 2:21am UTC](https://discuss.tvm.apache.org/t/how-to-compile-caffe-models/3422/3 "2019-07-22T02:21:17Z")

</div>

Is there still many caffe users today?

---

<div class="post-metadata">

**Author:** ![heloise](https://discuss.tvm.apache.org/user_avatar/discuss.tvm.apache.org/heloise/32/854_2.png) [@heloise](https://discuss.tvm.apache.org/u/heloise)\
**Post date:** [July 22, 2019, 2:21am UTC](https://discuss.tvm.apache.org/t/how-to-compile-caffe-models/3422/4 "2019-07-22T02:21:53Z")

</div>

Thanks for your reply! Maybe after I’m more familiar with TVM, I’ll try to implement Caffe frontend. 😀

---

<div class="post-metadata">

**Author:** ![heloise](https://discuss.tvm.apache.org/user_avatar/discuss.tvm.apache.org/heloise/32/854_2.png) [@heloise](https://discuss.tvm.apache.org/u/heloise)\
**Post date:** [July 22, 2019, 2:23am UTC](https://discuss.tvm.apache.org/t/how-to-compile-caffe-models/3422/5 "2019-07-22T02:23:15Z")

</div>

Our group mostly uses caffe.

---

<div class="post-metadata">

**Author:** ![Lyken17](https://discuss.tvm.apache.org/user_avatar/discuss.tvm.apache.org/lyken17/32/711_2.png) [@Lyken17](https://discuss.tvm.apache.org/u/Lyken17)\
**Post date:** [July 22, 2019, 2:25am UTC](https://discuss.tvm.apache.org/t/how-to-compile-caffe-models/3422/6 "2019-07-22T02:25:22Z")

</div>

> [@heloise](#):
>
> Thanks for your reply! Maybe after I’m more familiar with TVM, I’ll try to implement Caffe frontend. 😀

I see. It would be great if you group can contribute a caffe frontend conversion.

---

<div class="post-metadata">

**Author:** ![FrozenGene](https://discuss.tvm.apache.org/user_avatar/discuss.tvm.apache.org/frozengene/32/1114_2.png) [@FrozenGene](https://discuss.tvm.apache.org/u/FrozenGene)\
**Post date:** [July 22, 2019, 2:57am UTC](https://discuss.tvm.apache.org/t/how-to-compile-caffe-models/3422/7 "2019-07-22T02:57:11Z")

</div>

Great. Welcome to contribute it back.
