# Caffe to TensorFlow

* TensorFlowTransformer will build a Kaffe graph first, from the caffe prototxt.
  * It has its own node class and graph class
  * Node: layer type, specification, parameters, parent, children etc.
  * Graph: how to add node / build graph in topological order
* Converting the parameters of all graph nodes into correct format ((c\_o, c\_i, h, w) -> (h, w, c\_i, c\_o))
  * In Numpy format
* Write generated [Kaffe.tensorflow.Network](http://kaffe.tensorflow.network) class code
* When doing the inference,  [Kaffe.tensorflow.Network](http://kaffe.tensorflow.network) will converting the Kaffe nodes into tensorflow operators.
* Problem:
  * Needs updated version caffe model
  * Needs Kaffe library
  * Numpy format parameters
  * Couldn’t deploy
  * Tensorflow version out-dated
* Modified version:
  * Automatic caffe model updating script
  * Update tensorflow operators from 0.8.0 -> 1.2.1
  * Add saving checkpoint and frozen graph options, ez deployment&#x20;

Reference:

{% embed url="<https://github.com/ethereon/caffe-tensorflow>" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://sisyphus.gitbook.io/project/deep-learning-basics/converting-between-frameworks/caffe-to-tensorflow.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
