You may need to configure a proxy server if you're having trouble cloning
or fetching from a remote repository or getting an error
like unable to access '...' Couldn't resolve host '...'
.
Consider something like:
""" | |
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) |
import numpy as np | |
def fvecs_read(filename, c_contiguous=True): | |
fv = np.fromfile(filename, dtype=np.float32) | |
if fv.size == 0: | |
return np.zeros((0, 0)) | |
dim = fv.view(np.int32)[0] | |
assert dim > 0 | |
fv = fv.reshape(-1, 1 + dim) |