This file contains hidden or 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
| import numpy as np | |
| import os | |
| from pynput.mouse import Listener, Button | |
| bounding_box = [] | |
| def on_click(x, y, btn, down): | |
| if btn == Button.left and down: | |
| print(x, y) | |
| bounding_box.append((x, y)) |
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 hidden or 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
| import torch | |
| import torch.nn as nn | |
| from torch.nn import Module | |
| from torch.nn.parameter import Parameter | |
| from torch.nn import functional as F | |
| import numpy as np | |
| class LinearLowerTriangular(nn.Linear): | |
| def __init__(self, in_features, upscale=1, strict=True): |
This file contains hidden or 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
| import nltk | |
| import json | |
| from nltk import word_tokenize | |
| from collections import Counter | |
| from itertools import izip | |
| from pprint import pprint | |
| labels = ['entailment', 'contradiction', 'neutral'] | |
| def get_dataset(filename): |
This file contains hidden or 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
| <html> | |
| <body> | |
| <a href='javascript:var w = window.open("","bib","width=300,height=300,scrollbars=1,resizable=1");w.document.open();w.document.write("@article{krueger2017bayesian, | |
| title={Bayesian hypernetworks}, | |
| author={Krueger, David and Huang, Chin-Wei and Islam, Riashat and Turner, Ryan and Lacoste, Alexandre and Courville, Aaron}, | |
| journal={arXiv preprint arXiv:1710.04759}, | |
| year={2017} | |
| }");w.document.close();'> Open a window that says test</a> | |
| </body> | |
| </html> |
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 hidden or 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
| HostFromGpu(gpuarray) [id A] '' | |
| |GpuElemwise{Composite{(i0 + (i1 * i2))}}[]<gpuarray> [id B] '' | |
| |GpuDnnReduction{red_op='add', axis=None, acc_dtype='float32', dtype='float32', return_indices=False} [id C] '' | |
| | |GpuContiguous [id D] '' | |
| | |GpuElemwise{switch,no_inplace} [id E] '' | |
| | |GpuElemwise{neq,no_inplace} [id F] '' | |
| | | |GpuReshape{1} [id G] '' | |
| | | | |GpuSubtensor{int64:int64:int8, :int64:} [id H] '' | |
| | | | | |InplaceGpuDimShuffle{1,0} [id I] '' | |
| | | | | | |GpuFromHost<None> [id J] '' |
This file contains hidden or 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
| import theano.tensor as T | |
| import theano | |
| import numpy as np | |
| from theano_toolkit import hinton | |
| def log_cascaded_stick_breaking(lin_input, reps=5): | |
| idx = T.arange(lin_input.shape[1]) | |
| top_right = idx[None, :] > idx[:, None] | |
| log_g = -T.nnet.softplus(-lin_input) | |
| acc_log_neg = 0 |
This file contains hidden or 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
| " Use Vim settings, rather than Vi settings (much better!). | |
| " This must be first, because it changes other options as a side effect. | |
| set nocompatible | |
| scriptencoding utf-8 | |
| set encoding=utf-8 | |
| filetype plugin on | |
| " allow backspacing over everything in insert mode | |
| set backspace=indent,eol,start |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.