Skip to content

Instantly share code, notes, and snippets.

@chauhan-utk
chauhan-utk / logseq-base64-issue.md
Created August 21, 2021 03:33
Logseq Base64 render from Zotero notes issue

tags:: [[Computer Science - Artificial Intelligence]], [[Computer Science - Computation and Language]], [[Computer Science - Machine Learning]], [[Electrical Engineering and Systems Science - Audio and Speech Processing]] date:: [[Jun 14th, 2021]] extra:: arXiv: 2106.07447 title:: HuBERT Self-Supervised Speech Representation Learning by Masked Prediction of Hidden Units item-type:: [[journalArticle]] access-date:: 2021-07-27T06:40:41Z original-title:: HuBERT: Self-Supervised Speech Representation Learning by Masked Prediction of Hidden Units url:: http://arxiv.org/abs/2106.07447 short-title:: HuBERT publication-title:: "arXiv:2106.07447 [cs, eess]"

@chauhan-utk
chauhan-utk / file.md
Created March 10, 2018 13:53
PyTorch replace pretrained model layers

This code snippet shows how we can change a layer in a pretrained model. In the following code, we change all the ReLU activation functions with SELU in a resnet18 model.

import torch
from torchvision import model

resnet18 = model.resnet18(pretrained=True)

def funct(list_mods):
@chauhan-utk
chauhan-utk / GitHub_basics.md
Created February 16, 2018 06:49
Basic setting up for GitHub

Changing the GitHub repo url in local from HTTPS to git

see this link. Basic commands are as follows:

  • git remote -v
  • git remote set-url origin https://github.com/USERNAME/REPOSITORY.git
  • git remote -v
@chauhan-utk
chauhan-utk / Gradients_hooks.md
Last active February 10, 2018 05:26
Pytorch important

How to modify the gradients in the backward pass? Using a register_hook for saving the gradients of a Variable: link When we want to get more crazy with the gradients and want only one gradient computation to be done from two heads

    zz1
   /   
yy
   \
     zz2
@chauhan-utk
chauhan-utk / Basics.md
Last active September 11, 2019 10:03
Git and GitHub basic commands

Basic git commands:

  • git fetch : get remote commits to local repo
  • git pull <repo> <branch-name> e.g. git pull origin master : get the commits from remote branch to current branch
  • git branch -a : list all branches including remote branches
    • git checkout <branch-name> : switch to the branch
  • git branch -m <new-name> : rename current local branch. Check this for more information.
  • git checkout -b <new-branch> : create a new branch based on the current branch
    • git checkout -b <new-branch> <existing-branch> : create a new branch given an existing branch
  • git status : list of files tracked and not tracked
  • git add . or git add : add files to staging area