Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function [] = RankOneUpdateTest( D ) | |
nTrial = 1000; | |
invW = randn( 3*D, D); | |
invW = invW'*invW; | |
x = randn(D,1); | |
cholinvW = chol(invW,'upper'); | |
logdetinvW = 2*sum(log(diag(cholinvW))); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import subprocess | |
import sys | |
def main(): | |
proc = subprocess.Popen(['latexmk', '-pvc'] + sys.argv[1:], | |
stdin=subprocess.PIPE, | |
stdout=subprocess.PIPE, | |
stderr=subprocess.STDOUT, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%%javascript | |
Jupyter.keyboard_manager.command_shortcuts.remove_shortcut('up'); | |
Jupyter.keyboard_manager.command_shortcuts.remove_shortcut('down'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from decoders import inject_supervitamined_decoders, StochasticBeamSearchDecoder, FakeTransformer | |
from transformers import T5ForConditionalGeneration, T5Tokenizer | |
import torch | |
# pip install decoders | |
# this demonstration uses a fake toy transformer (https://manueldeprada.com/blog/posts/toy-probabilistic-transformer/) | |
# to test the correctness of the stochastic beam search implementation | |
def test_fake_transformer(): |