DEV Community

Discussion on: Handwritten Digit Recognition Using Convolutional Neural Networks

Collapse
 
wmeddie profile image
Eduardo Gonzalez

One thing you want to be careful with is that DL4J models aren't threadsafe. You want to wrap them inside the ParallelInference wrapper which has a few knobs for maximizing performance. You can see how to use it from the unit tests:

github.com/deeplearning4j/deeplear...

Collapse
 
frosnerd profile image
Frank Rosner

Thanks for letting me know. I was aware that the models aren't thread safe that's why I wrapped it around a synchronized block (as mentioned in the post). Definately going to take a look into the ParallelInference wrapper. Thanks for the link!