Skip to content

Latest commit

 

History

History
17 lines (14 loc) · 650 Bytes

README.md

File metadata and controls

17 lines (14 loc) · 650 Bytes

code_snippet

Some code snippets.

MISC:

  • google_drive.py: Download files from Google Drive using terminal
  • merge.ipynb: Merge two images into one (one on the left and the other one on the right, visually similar to A\B)

TensorBoard

Sometimes when you try to use tensorboard to visualize something, you don't have the write access. You can try

export TMPDIR=/tmp/$USER; mkdir -p $TMPDIR; tensorboard --logdir $LOGDIR

Get the number of (trainable) parameters in PyTorch

sum(p.numel() for p in model.parameters() if p.requires_grad)