Memory leak loading tensorflow hub modules

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(‘TensorFlow Hub’)

del model
gc.collect()

objgraph.show_growth()

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

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

1 Like