Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Working on new ideas on XAI

Natalia Díaz Rodríguez NataliaDiaz

💭
Working on new ideas on XAI
View GitHub Profile
@wdevazelhes
wdevazelhes / kernel_attention.py
Last active Jun 9, 2019
trying to use kernel approximations by explicit feature maps for softmax self-attention
View kernel_attention.py
import numpy as np
from sklearn.utils.extmath import softmax
from sklearn.kernel_approximation import RBFSampler
from sklearn_extra.kernel_approximation import Fastfood
seed = 42
rng = np.random.RandomState(seed)
D = 20
View Still_Box_README.md

Still Box

Torrent description

In addition to this README, this torrent contains 4 datasets:

Name Image size (px) Scene number Size compressed (B) Total size (B)
64.tar.xz 64x64 80K 9.8G 19G
128.tar.xz 128x128 20K 7.1G 12G
View xception.lua
-- Xception model
-- a Torch7 implementation of: https://arxiv.org/abs/1610.02357
-- E. Culurciello, October 2016
require 'nn'
local nClasses = 1000
function nn.SpatialSeparableConvolution(nInputPlane, nOutputPlane, kW, kH)
local block = nn.Sequential()
block:add(nn.SpatialConvolutionMap(nn.tables.oneToOne(nInputPlane), kW,kH, 1,1, 1,1))
View classifier_from_little_data_script_1.py
'''This script goes along the blog post
"Building powerful image classification models using very little data"
from blog.keras.io.
It uses data that can be downloaded at:
https://www.kaggle.com/c/dogs-vs-cats/data
In our setup, we:
- created a data/ folder
- created train/ and validation/ subfolders inside data/
- created cats/ and dogs/ subfolders inside train/ and validation/
- put the cat pictures index 0-999 in data/train/cats
View How to link Sublime Text Build system to Python 3
@baraldilorenzo
baraldilorenzo / readme.md
Last active Nov 16, 2021
VGG-16 pre-trained model for Keras
View readme.md

##VGG16 model for Keras

This is the Keras model of the 16-layer network used by the VGG team in the ILSVRC-2014 competition.

It has been obtained by directly converting the Caffe model provived by the authors.

Details about the network architecture can be found in the following arXiv paper:

Very Deep Convolutional Networks for Large-Scale Image Recognition
K. Simonyan, A. Zisserman
@nylki
nylki / char-rnn recipes.md
Last active May 4, 2021
char-rnn cooking recipes
View char-rnn recipes.md

do androids dream of cooking?

The following recipes are sampled from a trained neural net. You can find the repo to train your own neural net here: https://github.com/karpathy/char-rnn Thanks to Andrej Karpathy for the great code! It's really easy to setup.

The recipes I used for training the char-rnn are from a recipe collection called ffts.com And here is the actual zipped data (uncompressed ~35 MB) I used for training. The ZIP is also archived @ archive.org in case the original links becomes invalid in the future.

@SiestaMadokaist
SiestaMadokaist / SummedAreaTable.py
Last active Nov 17, 2020
Implementation of summed area table / integral image in python.
View SummedAreaTable.py
class SummedAreaTable(object):
def __init__(self, size, data):
"""
Just because I dislike a 2d array / list.
data should be a List of Integer.
"""
width, height = size
assert width * height == len(data), "invalid data length and or data size"
self.size = size
self.data = data
@tylerneylon
tylerneylon / json.lua
Last active Nov 16, 2021
Pure Lua json library.
View json.lua
--[[ json.lua
A compact pure-Lua JSON library.
The main functions are: json.stringify, json.parse.
## json.stringify:
This expects the following to be true of any tables being encoded:
* They only have string or number keys. Number keys must be represented as
strings in json; this is part of the json spec.
@jakevdp
jakevdp / discrete_cmap.py
Last active Nov 15, 2021
Small utility to create a discrete matplotlib colormap
View discrete_cmap.py
# By Jake VanderPlas
# License: BSD-style
import matplotlib.pyplot as plt
import numpy as np
def discrete_cmap(N, base_cmap=None):
"""Create an N-bin discrete colormap from the specified input map"""