git config --global color.diff auto
git config --global color.status auto
git config --global color.branch autogit config --global core.editor vimcp Tools/.git-completion.bash ~/
source ~/.git-completion.bashgit config --global alias.st status
git config --global alias.co checkout
git config --global alias.ct commit
git config --global alias.df diff
git config --global alias.br branchcp -r Tools/vim ~/.vim
cp Tools/.vimrc ~/First install using pip install line_profiler.
Then copy this file (https://github.com/rkern/line_profiler/blob/master/kernprof.py) to your project folder.
Suppose we wanna know the running time of function forward in ./lib/layers/eric_temp_layers.py, we should first add @profile above the definition of forward.
Then
kernprof -l train.py
After running, it will store all the log into train.py.lprof.
We can view it using
python -m line_profiler train.py.lprof