rom1504 / embedding-reader

Efficiently read embedding in streaming from any filesystem
MIT License
94 stars 19 forks source link

inference example #16

Closed rom1504 closed 2 years ago

rom1504 commented 2 years ago

computing safety predictions on top of clip embeddings

rom1504 commented 2 years ago

https://www.tensorflow.org/guide/data#consuming_python_generators probably would be faster with this (Already 100k sample/s but could be much faster, it's not using resources well)

rom1504 commented 2 years ago

This is WIP. I'm not even sure I really want to put this here, I need to think some more about it

rom1504 commented 2 years ago

works better, but still memleak

I think it's due to tf though and not embedding reader

something like https://stackoverflow.com/questions/64199384/tf-keras-model-predict-results-in-memory-leak

rom1504 commented 2 years ago

works now and no memleak