It depend of your production environment. But you can start a server with
multiple process and they compile the function when the process is started,
but you reuse it for many function call.

You can also pickle the Theano function and have the process unpickle it.
It would be faster then recompile it. This do not remove any tho
dependencies.

Fred

Le ven. 24 mars 2017 05:47, Нурислам Алимов <[email protected]> a écrit :

> I use this code in parallel. Is it correct?
>
>
> test_model_predict = theano.function(inputs=[self.start_idx, self.end_idx
> ],
>  outputs=self.classifier.predict(self.y),
>  givens={
>  self.x: test_set_x[self.start_idx:self.end_idx],
>  self.y: test_set_y[self.start_idx:self.end_idx]})
>
>
> test_predictions = test_model_predict(0, len(test_set[1]))
>
> How can I call predictions of model without use theano.function - because
> it is not thread safe function as I know and it is very long.
>
> Please help.
>
> --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "theano-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"theano-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to