斯巴达第二季
董昊 (Robin Dong)
http://blog.donghao.org-
How could it possible to assign an integer to stri
The snippet below could be compiled and run: [代码片段] The result is: [代码片段] I noticed that the corresponding value of key ‘banana’ is empty. The reason is I assign an integer directly to key ‘bana …阅读全文 -
Move semantics in C++11
After studying an example for Move Semantics of C++11, I write a more complete code snippet: [代码片段] Pay attention to last two lines in ‘move constructor’: [代码片段] Since ‘move constructor’ …阅读全文 -
How Tensorflow set device for each Operation ?
In Tensorflow, we only need to use snippet below to assign a device to a Operation: [代码片段] How dose it implement? Let’s take a look. There is a mechanism called ‘context manager’ in Pytho …阅读全文 -
Some tips about using google’s TPU (Cont.)
Sometimes I get this error from TPUEstimator: [代码片段] And after stop and restart TPU in console of GCP , the error disappeared. TPU doesn’t allow users to use it directly like GPU. You can’t …阅读全文 -
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 1 …阅读全文 -
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: [代码片段] Although training could …阅读全文 -
Choosing a Object Detection Framework written by T
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 cou …阅读全文 -
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: [代码片段] Seems ok. The system wil …阅读全文 -
Migrate blog to AWS’s ec2
My blog had been hosting on Linost since 2013. But recently support staff from Linost noticed me that my site has led CPU usage of the host machine to 100% so the hosting system automatically ‘ …阅读全文 -
Source code analysis for Autograd
Autograd is a convenient tool to automatically differentiate native Python and Numpy code. Let’s look at an example first: [代码片段] The result is 3.2 f(x) = sqaure(x) + 1, its derivative is …阅读全文