Quantcast
Browsing all 236 articles
Browse latest View live

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 Article


Choosing 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 Article


Some 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 Article

Some 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 Article

Image may be NSFW.
Clik here to view.

Some 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 Article


How 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 Article

Move 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 Article

How 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 Article


Some 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 Article


The 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 Article

Image may be NSFW.
Clik here to view.

Compare 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 Article

Some 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 Article

A 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 Article


Write 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 Article

Image may be NSFW.
Clik here to view.

Books 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 Article


Some 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 Article

A 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 Article


Using 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 Article

LinearSVC 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 Article

Some 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
Browsing all 236 articles
Browse latest View live