nnfs icon indicating copy to clipboard operation
nnfs copied to clipboard

Datasets as csv files ?

Open dkuku opened this issue 4 years ago • 1 comments

Hi, I like this book, the qr code links are really cool. Also the complementary videos are useful. It would be nice to include the the datasets as csv files for people who try to use different languages than python so we can still have consistent results with the book.

dkuku avatar Dec 30 '21 21:12 dkuku

quick and hacky solution if someone needs to dump the data:

import numpy as np
import nnfs
from nnfs.datasets import spiral_data
nnfs.init()
X, y = spiral_data(samples=100, classes=3)
a = np.asarray(X)
b = np.asarray(y)
np.savetxt("X.csv", a, delimiter=",", fmt='%f')
np.savetxt("y.csv", b, delimiter=",", fmt='%d')

dkuku avatar Dec 30 '21 21:12 dkuku