[P] OpenCL framework with Dense layers
Written by torontoai on . Posted in Reddit MachineLearning.
I made simple DL framework on OpenCL just with Dense layers and several activations and losses: https://github.com/Airplaneless/Hallgerd
Matrix multiplication performance
Syntax is similar to Keras:
In : from hallgerd.core import Sequential gpu = Device(devices['GeForce GTX 660'], DTYPE=np.float32) model = Sequential(device=gpu, lr=1e-1, batch_size=1024, epochs=40, loss='cross_entropy') In : model.add(Dense(200, 200, activation='relu')) model.add(Dense(200, 5, activation='softmax')) In : model.fit(X, y) # here X.shape = (feature size, dataset size) # y.shape = (output size, dataset size) In : yp = model(X)
I think performance is quite sufficient on devices without PyTorch or Tensorflow support.
submitted by /u/airplanelesss