Skip to content

Instantly share code, notes, and snippets.

View gonultasbu's full-sized avatar

Burak Mert Gonultas gonultasbu

View GitHub Profile
@cbaziotis
cbaziotis / AttentionWithContext.py
Last active April 25, 2022 14:37
Keras Layer that implements an Attention mechanism, with a context/query vector, for temporal data. Supports Masking. Follows the work of Yang et al. [https://www.cs.cmu.edu/~diyiy/docs/naacl16.pdf] "Hierarchical Attention Networks for Document Classification"
def dot_product(x, kernel):
"""
Wrapper for dot product operation, in order to be compatible with both
Theano and Tensorflow
Args:
x (): input
kernel (): weights
Returns:
"""
if K.backend() == 'tensorflow':
@9bitbear
9bitbear / AMD-Radeon-GPU-Linux-setup.md
Last active March 20, 2021 21:54
AMD RX Series GPU setup for Mining

Running AMD Radeon GPUS on Ubuntu 16.04

Cards tested (so far):

Model Released
Radeon RX 550 April 2017
Radeon RX 560 April 2017
Radeon HD 7800 Series March 2012
@OniDaito
OniDaito / pytorchvis.py
Created May 14, 2020 16:41
Given a model from pytorch, print out to console and graphviz to see what is going on
# Our drawing graph functions. We rely / have borrowed from the following
# python libraries:
# https://github.com/szagoruyko/pytorchviz/blob/master/torchviz/dot.py
# https://github.com/willmcgugan/rich
# https://graphviz.readthedocs.io/en/stable/
def draw_graph(start, watch=[]):
from graphviz import Digraph