Tensorflow: Passing a session to a python multiprocess

前端 未结 2 1946
谎友^
谎友^ 2020-12-31 15:43

I\'m using tensorflow to preprocess some large images. I was having a problem where the memory was rapidly collapsing. I turned to use multiprocessing in python so the memor

2条回答
  •  情深已故
    2020-12-31 16:00

    All you need is distributed tensorflow.

    1. Create the graph and session in the parent process. Place some of the operators(especially, variables) to workers while constructing graph.
    2. Create child processes, and run them

提交回复
热议问题