How to prefetch data using a custom python function in tensorflow

This is a common use case, and most implementations use TensorFlow’s queues to decouple the preprocessing code from the training code. There is a tutorial on how to use queues, but the main steps are as follows: Define a queue, q, that will buffer the preprocessed data. TensorFlow supports the simple tf.FIFOQueue that produces elements … Read more

fastest (low latency) method for Inter Process Communication between Java and C/C++

Just tested latency from Java on my Corei5 2.8GHz, only single byte send/received, 2 Java processes just spawned, without assigning specific CPU cores with taskset: TCP – 25 microseconds Named pipes – 15 microseconds Now explicitly specifying core masks, like taskset 1 java Srv or taskset 2 java Cli: TCP, same cores: 30 microseconds TCP, … Read more

Loading and displaying large text files

Because of the size, you’ll surely want to load the file in the background to avoid blocking the event dispatch thread; SwingWorker is a common choice. Instead of using a Document, consider updating a TableModel and displaying the lines of text in the rows of a JTable. This offers several advantages: Results will begin appearing … Read more