Skip to content

vt-vl-lab/code_snippet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

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)

Releases

No releases published

Packages

No packages published

Languages