# Load a tensorflow "SavedModel" in dl4j

**URL:** https://community.konduit.ai/t/load-a-tensorflow-savedmodel-in-dl4j/55
**Category:** DL4J
**Created:** [January 6, 2020, 2:10am UTC](https://community.konduit.ai/t/load-a-tensorflow-savedmodel-in-dl4j/55 "2020-01-06T02:10:27Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![diane](https://avatars.discourse-cdn.com/v4/letter/d/2acd7d/32.png) [@diane](https://community.konduit.ai/u/diane)
#### Post date: [January 6, 2020, 2:10am UTC](https://community.konduit.ai/t/load-a-tensorflow-savedmodel-in-dl4j/55/1 "2020-01-06T02:10:27Z")

</div>

How can I load a tensorflow “SavedModel” in DL4J?

---

<div class="post-metadata">

### Author: ![AlexBlack](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.konduit.ai/alexblack/32/25_2.png) [@AlexBlack](https://community.konduit.ai/u/AlexBlack)
#### Post date: [January 6, 2020, 2:32am UTC](https://community.konduit.ai/t/load-a-tensorflow-savedmodel-in-dl4j/55/2 "2020-01-06T02:32:32Z")

</div>

Deeplearning4j supports importing Keras models.

SameDiff, our automatic differentiation library that is built on top of ND4J, supports importing of frozen TensorFlow models only at present. SavedModel support may be added in the future.

You can convert models (including SavedModel) to frozen model format using the following tool:  
[https://github.com/tensorflow/tensorflow/blob/master/tensorflow/python/tools/freeze\_graph.py](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/python/tools/freeze_graph.py)

For example:

```auto
freeze_graph.freeze_graph(
    input_graph=path_to_your_graph,
    input_checkpoint=path_to_your_checkpoint,
    input_saver="",
    output_graph=output_graph,
    input_binary=True,
    output_node_names="loss/Softmax", 
    restore_op_name="save/restore_all",
    filename_tensor_name="save/Const:0",
    clear_devices=True,
    initializer_nodes="")

```

After conversion, you can load them in SameDiff using the `SameDiff.importFrozenTF(File)` method.
