Skip to content

Instantly share code, notes, and snippets.

View Rangozhang's full-sized avatar

Yu Zhang Rangozhang

  • Carnegie Mellon University, Robotics Institute
  • Pittsburgh, PA
View GitHub Profile
-- suppose you have a model called model
lrs_model = model:clone()
lrs = lrs_model:getParameters()
lrs:fill(1) -- setting the base learning rate to 1
-- now lets set the learning rate factor of the bias of module 5 to 2
lrs_model:get(5).bias:fill(2)
-- same thing for the weights of module 2, let's set them to 3
lrs_model:get(2).weight:fill(3)
@atelic
atelic / tmux.conf
Last active November 5, 2023 23:39
A vim-friendly tmux config
# change prefix to Ctrl-a (like in gnu-screen)
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
# shell
set -g default-command /bin/zsh
set -g default-shell /bin/zsh