Is Keras thread safe?

前端 未结 2 771
别那么骄傲
别那么骄傲 2020-12-03 05:03

I\'m using Python and Keras (currently using Theano backend, but I have no qualms with switching). I have a neural network that I load and process multiple sources of inform

2条回答
  •  我在风中等你
    2020-12-03 05:27

    to quote the kind fcholet:

    _make_predict_function is a private API. We should not recommend calling it.

    Here, the user should simply call predict first.

    Note that Keras models can't be guaranteed to be thread-safe. Consider having independent copies of the model in each thread for CPU inference.

提交回复
热议问题