Ben Chuanlong Du's Blog

It is never too late to learn.

"." Is Not Recognized as An Internal or External Command

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

I encountered the following error message when running a Windows command !./osqueryi.exe .tables in the IPython shell.

In[15] >>> !./osqueryi.exe .tables
'.' is not recognized as an internal or external …

ImportError: Attempted Relative Import With No Known Parent Package

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

Symptom

ImportError: Attempted Relative Import With No Known Parent Package

Solution

The best solution is to run the Python script as a Python module. However, you have to add the directory …

Models in Torchvision and Ways to Finetune Them

inception_v3 requires an input of (299, 299) while other models requires an input of (224, 224). Due to adaptive pooling used in some models, they can run on varying sized intput without throwing errors (but the results are usually not correct). You have to resize/crop an image to be the right input size (and then other necessary transformations, e.g., to_tensor

Tips on MuMu App Player

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

  1. Neither MuMu App Player nor MuMu Game Assistant supports Hyper-V currently. As a matter of fact, all popular Android emulators does not support Hyper-v at this time (as of Aug 22 …

Tips on Pillow

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

PIL.Image.Image.crop

Notice that the bounding box is inclusive/EXCLUSIVE like the range function. PIL.Image.Image.crop does not accept a bounding box of zero size!

PIL.Image …