Finding core-dump file
In a new server, my program got ‘core dump’. But I haven’t found the core-dump file in the current directory as usual. First I checked the ‘ulimit’ configuration:core file size (blocks, -c)...
View ArticleChoosing a Object Detection Framework written by Tensorflow
Recently I need to train a DNN model for object detection task. In the past, I am using the object detection framework from tensorflows’s subject — models. But there are two reasons that I couldn’t use...
View ArticleSome modifications about SSD-Tensorflow
In the previous article, I introduced a new library for Object Detection. But yesterday, after I added slim.batch_norm() into ‘nets/ssd_vgg_512.py’ like this:def ssd_arg_scope(weight_decay=0.0005,...
View ArticleSome tips about using google’s TPU
About one month ago, I submit a request to Google Research Cloud for using TPU for free. Fortunately, I received the approvement yesterday. The approvement let me use 5 regular Cloud TPUs and 100...
View ArticleSome tips about using google’s TPU (Cont.)
Sometimes I get this error from TPUEstimator:... File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 900, in run run_metadata_ptr) File...
View ArticleHow Tensorflow set device for each Operation ?
In Tensorflow, we only need to use snippet below to assign a device to a Operation:with tf.device('/GPU:0'): ... result = tf.matmul(a, b)How dose it implement? Let’s take a look. There is a mechanism...
View ArticleMove semantics in C++11
After studying an example for Move Semantics of C++11, I write a more complete code snippet:#include <iostream> using namespace std; class Intvec { public: explicit Intvec(size_t num = 0) :...
View ArticleHow could it possible to assign an integer to string?
The snippet below could be compiled and run:#include <map> #include <string> #include <iostream> using namespace std; int main(void) { std::map<std::string, std::string> hmap;...
View ArticleSome lessons from Kaggle’s competition
About two months ago, I joined the competition of ‘RSNA Pneumonia Detection’ in Kaggle. It’s ended yesterday, but I still have many experiences and lessons to be rethinking. 1. Augmentation is...
View ArticleThe bug about using hooks and MirroredStrategy in tf.estimator.Estimator
When I was using MirroedStrategy in my tf.estimator.Estimator:distribution = tf.contrib.distribute.MirroredStrategy( ["/device:GPU:0", "/device:GPU:1"]) config =...
View ArticleCompare implementation of tf.AdamOptimizer to its paper
When I reviewed the implementation of Adam optimizer in tensorflow yesterday, I noticed that it’s code is different from the formulas that I saw in Adam’s paper. In tensorflow’s formulas for Adam are:...
View ArticleSome tips about python this week
List of lists in python Created a list of lists by using multiply symbol:>>> a = [[]] * 2 >>> a [[], []] >>> a[0].append('hello') >>> a [['hello'], ['hello']]It’s...
View ArticleA successful rescue for a remote server
After installed CUDA-9.2 on a remote server, I found that the system can’t load nvidia.ko (kernel module) with dmesg:Unknown symbol __stack_chk_fail (err 0)The reason is the current kernel running on...
View ArticleWrite text to file with disabling buffer in Python3
In Python2 era, we could use these code to write the file without buffer:file = open('my.txt', 'w', 0) file.write('hello')But in Python3 we can only write binary file by disabling buffer:file =...
View ArticleBooks I read in year 2018
In the 2018 year, I continued to learn more knowledge about machine learning and deep Learning. “Deep Learning” is pretty suitable for me and “Hands-On Machine Learning with Scikit-Learn and...
View ArticleSome errors in dataset pipeline of Tensorflow
To extend image datasets by using mixup,I use this snippet to mix two images:major_image = cv2.imread('1.jpeg') minor_image = cv2.imread('2.jpeg') new_image = major_image * 0.9 + minor_image * 0.1But...
View ArticleA few other lessons from Kaggle’s competition ‘Human Protein Atlas Image...
Practice makes progress. Therefore I continued to join Kaggle’s new competition ‘Human Protein Atlas Image Classification’ after the previous one. I used think I could get a higher rating in image...
View ArticleUsing keras.layers.Embedding instead of python dictionary
Firstly, I use a function to transform words into word-embedding:def text_to_array(text, embeddings_index): empty_embed = np.zeros(EMBEDDING_LENGTH, dtype = np.float32) text =...
View ArticleLinearSVC versus SVC in scikit-learn
In competition ‘Quora Insincere Questions Classification’, I want to use simple TF-IDF statistics as a baseline.def grid_search(classifier, parameters, X, y, X_train, y_train, X_test, y_test, name =...
View ArticleSome tips about Python, Pandas, and Tensorflow
There are some useful tips for using Keras and Tensorflow to build models. 1. Using applications.inception_v3.InceptionV3(include_top = False, weights = ‘Imagenet’) to get pretrained parameters for...
View Article