Skip to content

Instantly share code, notes, and snippets.

View hellosaumil's full-sized avatar
💭
Learning from Machines, when Machines are Learning...

Saumil Shah hellosaumil

💭
Learning from Machines, when Machines are Learning...
View GitHub Profile
@hellosaumil
hellosaumil / min-char-rnn.py
Created August 26, 2023 03:43 — forked from karpathy/min-char-rnn.py
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)
class myNNUnwrapper():
def __init__(self, inputTensor, nnModules, nnParams, verbose=False):
self.inputTensor = inputTensor
self.nnModules, self.nnParams = nnModules, nnParams
self.verbose = verbose
self.resolveAll()
Ää
l¸úF˘ j®P.ÄMÈ.Ä}q(Uprotocol_versionqMÈU
type_sizesq}q(UintqKUshortqKUlongqKuU
little_endianqàu.Äccollections
OrderedDict
q]q(]q(U conv1.weightqctorch._utils
_rebuild_tensor
q((Ustorageqctorch
FloatStorage
qU94641065704928qUcuda:0q ä NtQK(ä ääät(äääättRq
@hellosaumil
hellosaumil / Labels-ImageNet-ResNet.json
Last active December 5, 2017 19:11 — forked from maraoz/gist:388eddec39d60c6d52d4
Imagenet output tensor index to label mapping
{
"0": "tench, Tinca tinca",
"1": "goldfish, Carassius auratus",
"2": "great white shark, white shark, man-eater, man-eating shark, Carcharodon carcharias",
"3": "tiger shark, Galeocerdo cuvieri",
"4": "hammerhead, hammerhead shark",
"5": "electric ray, crampfish, numbfish, torpedo",
"6": "stingray",
"7": "cock",
"8": "hen",