jefkine / zeta-learn

zeta-lean: minimalistic python machine learning library built on top of numpy and matplotlib
https://zeta-learn.com/
MIT License
36 stars 6 forks source link

add GPU #3

Open dzwduan opened 6 years ago

dzwduan commented 6 years ago

from https://github.com/oreilly-japan/deep-learning-from-scratch-2 if GPU: import cupy as np np.cuda.set_allocator(np.cuda.MemoryPool().malloc) np.add.at = np.scatter_add

print('\033[92m' + '-' * 60 + '\033[0m')
print(' ' * 23 + '\033[92mGPU Mode (cupy)\033[0m')
print('\033[92m' + '-' * 60 + '\033[0m\n')

else: import numpy as np

jefkine commented 6 years ago

This looks great! Do you have suggestions on virtual server providers where I can run the test with GPUs enabled

dzwduan commented 6 years ago

in google colaboratory use gpu mode online or use aws service.

dzwduan commented 6 years ago

and like https://github.com/oujago/NumpyDL/tree/master/applications building an application with flask also great.