# Memory leak loading tensorflow hub modules

**URL:** <https://discuss.ai.google.dev/t/memory-leak-loading-tensorflow-hub-modules/29549>\
**Category:** General Discussion\
**Tags:** tfhub, help\_request\
**Created:** [October 25, 2022, 7:01am UTC](https://discuss.ai.google.dev/t/memory-leak-loading-tensorflow-hub-modules/29549 "2022-10-25T07:01:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![xu\_song](https://d1dlmcr85iqnpo.cloudfront.net/user_avatar/discuss.ai.google.dev/xu_song/32/11202_2.png) [@xu\_song](https://discuss.ai.google.dev/u/xu_song)\
**Post date:** [October 25, 2022, 7:01am UTC](https://discuss.ai.google.dev/t/memory-leak-loading-tensorflow-hub-modules/29549/1 "2022-10-25T07:01:53Z")

</div>

Memory leak loading hub modules. I use objgraph.show\_growth() to see memory change: after load modules, list +3 ,SentinelMapper +1, SentinelFilter + 1.

# Please help me, thank you very much!

model = hub.load(‘[https://hub.tensorflow.google.cn/google/magenta/arbitrary-image-stylization-v1-256/2](https://hub.tensorflow.google.cn/google/magenta/arbitrary-image-stylization-v1-256/2)’)

del model  
gc.collect()

# objgraph.show\_growth()

list 15577 +3  
SentinelMapper 2 +1  
SentinelFilter 2 +1

---

<div class="post-metadata">

**Author:** ![Kiran\_Sai\_Ramineni](https://d1dlmcr85iqnpo.cloudfront.net/user_avatar/discuss.ai.google.dev/kiran_sai_ramineni/32/8859_2.png) [@Kiran\_Sai\_Ramineni](https://discuss.ai.google.dev/u/Kiran_Sai_Ramineni)\
**Post date:** [May 31, 2023, 10:27am UTC](https://discuss.ai.google.dev/t/memory-leak-loading-tensorflow-hub-modules/29549/3 "2023-05-31T10:27:22Z")

</div>

Hi @xu_song, Could please provide the complete code to reproduce the issue. Thank You.
