Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Janzaib Masood jzm0144

🎯
Focusing
  • Rheem Manufacturing Company
  • Auburn, Alabama
View GitHub Profile
@Tushar-N
Tushar-N / hook_activations.py
Created Aug 3, 2018
Pytorch code to save activations for specific layers over an entire dataset
View hook_activations.py
import torch
import torch.nn as nn
import torch.nn.functional as F
import torchvision.models as tmodels
from functools import partial
import collections
# dummy data: 10 batches of images with batch size 16
dataset = [torch.rand(16,3,224,224).cuda() for _ in range(10)]
@itsmattsoria
itsmattsoria / gistfil1.textile
Last active Sep 12, 2022
Mac Terminal Cheat Sheet
View gistfil1.textile

SHORTCUTS

Key/Command Description
Tab Auto-complete files and folder names
Ctrl + A Go to the beginning of the line you are currently typing on
Ctrl + E Go to the end of the line you are currently typing on
Ctrl + U Clear the line before the cursor
Ctrl + K Clear the line after the cursor
Ctrl + W Delete the word before the cursor
Ctrl + T Swap the last two characters before the cursor