gathering non-identical indices that match a condition in a matrix using tensorflow

here is an example. There is a square shaped 2-dimensional matrix(ss_matrix) and I want to get the index pairs which satisfy where the value of the matrix is above 0.8. But, I do not wish to select the index pairs where the first and second index are the same. This Read more…

calculating IOU in a vectorized manner and fetching index pairs that are above threshold

when doing object detection, it would be very hard to avoid calculating IOU at some point. Although this could be done iteratively one by one in python with a for loop if there are only a few boxes, when the number of boxes become large the computation time increases significantly. Read more…

Tensor is not and element of this graph error when using Keras model in multithread in python

When a python script containing a keras model, it will work fine when the script is executed without any multithreading/multiprocessing. However, once multithreading is used and a keras model needs to execute in a new thread, it will cause problems. Here is an error message that I encountered. Solution after Read more…

libcupti.so import error

error message 2019-01-07 13:20:29.745928: I tensorflow/stream_executor/dso_loader.cc:129] Couldn’t open CUDA library libcupti.so.8.0. LD_LIBRARY_PATH: /usr/lib/oracle/11.2/client64/lib:/usr/local/cuda-8.0/lib64:/usr/local/lib2019-01-07 13:20:29.745965: F ./tensorflow/stream_executor/lib/statusor.h:212] Non-OK-status: status_ status: Failed precondition: could not dlopen DSO: libcupti.so.8.0; dlerror: libcupti.so.8.0: cannot open shared object file: No such file or directory중지됨 (core dumped) solution the error is due to missing LD_LIBRARY_PATH pointing to Read more…

mod 1000000007 reason

https://www.geeksforgeeks.org/modulo-1097-1000000007/

building python from source

prepare installing packages (assuming Ubuntu environment) download and installing python source altinstall is recommended in order to avoid messing up the existing python executable.

matplotlib table example

output: table.scale function will help adjust the row height to match to the font size. Without the table.scale function, here is what the output looks like.