1. Type convertion in Numpy Here is my code:

import numpy as np a = np.asarray([1, 2]) b = [] c = np.concatenate((a, b)) print(c.dtype) 
Guess what? The type of variable ‘c’ is ‘float64’! Seems Numpy automatically considers a empty array of Python as ‘float64’ type. So the correct code should be:

import numpy as np a = np.asarray([1, 2]) b = [] c = np.concatenate((a, np.asarray(b, dtype=a.dtype)) 
This time, the type of ‘c’ is ‘int64’ 2. Convert a tensor… Read more »
In the previous article, I reached mAP 0.739 for VOC2007. After about two weeks, I add more tricks to reach mAP 0.740. The most important trick is escalating the expandscale of augmentation which is made from this patch. Increase the scale range could help the model to detect a smaller… Read more »
Previously, I was using CUB200 dataset to train my object detection model. But after I used CUB2002011 dataset instead, the training loss became ‘nan’.

iter 10  Loss: 17.9996  timer: 0.2171 sec. iter 20  Loss: nan  timer: 0.2145 sec. iter 30  Loss: nan  timer: 0.2145 sec. ... 
I tried to reduce the learning rate, change optimizer from SGD to Adam, and use different types of initializer for parameters. None of these solved… Read more »
1. ‘()’ may mean tuple or nothing.

len(("birds")) # the inner '()' means nothing len(("birds",)) # the inner '()' means tulple because of the comma 
The result is:
2. Unlike TensorFlow’s static graph, PyTorch could run neural network just as the code. This means a lot of conveniences. The first advantage, we could print out any tensor in our program, no matter in prediction or training…. Read more »