Giter Club home page Giter Club logo

litenn's Introduction

LiteNN

lightweight Machine Learning library based on OpenCL 1.2 and written in pure python

suitable for most popular ML tasks such as regression, recognition, classification, autoencoders, GANs.

Features

written in pure python Nothing to build from source! No headache with cmake, bazel, compilers, environments, etc.
future-proof unlike CUDA, OpenCL 1.2 does not break backward compatibility with new video cards, so your app will work on future devices.
Simplified and pytorch-like PyTorch-like, but more lightweight architecture with simplified things.
Easy to experiment Implement your own custom GPU-accelerated ops much more faster, using OpenCL C-language as text directly in python. You don't need to compile or build from source.
user namespace litenn is namespace for users.

You will not see internal classes or functions in your vscode intellisense hint.

All things in litenn namespace are ready to use, contain editor hint, and the source code can be directly explored from your IDE.

Minimal dependencies numpy only

Getting started

pip install litenn

import litenn as nn
nn.test.all()

Open In Colab

#machinelearning #machine-learning #deep-learning #deeplearning #deep-neural-networks #neural-networks #neural-nets #opencl

litenn's People

Contributors

iperov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

litenn's Issues

Great work

Will try to make prs for enhancements :)

How to load images ?

Hello,
I been playing around with LiteNN, and i wanted to say great job on the LiteNN. also i want to ask how to load images as there seem no official way to load batches of images, my current stop gap measure is to use opencv to load images and convert it into numpy array afterward convert it into a Tensor.

imgcv = cv2.imread(imgpath)
test_tensor = nn.Tensor_from_value(imgcv)

Will there be a way to load images directly from LiteNN ?,

Error found after simple install.

Hello! (I'm a reddit user that saw your post about litenn).

I'm very glad to have had a chance to experiment with LiteNN. However, I encountered the following error upon installation. The procedure I used to install (on MacOS) was to create a separate environment in Anaconda Navigator, then open the terminal using that environment and pip3 install litenn. Then in a jupyter notebook I would type import litenn as nn, resulting in the error below. Any pointer or reference you might have to solve this would be helpful, as I am very keen on trying litenn out. Thank you in advance!


AttributeError Traceback (most recent call last)
in
----> 1 import litenn as nn

/opt/anaconda3/envs/litenn/lib/python3.8/site-packages/litenn/init.py in
9 Optimizers in 'nn.optimizer.' namespace
10 """
---> 11 import litenn.core
12
13

/opt/anaconda3/envs/litenn/lib/python3.8/site-packages/litenn/core/init.py in
2 from .Saveable import Saveable
3
----> 4 from .minicl import (CLDevice, CLBuffer, CLDevicesBuffers, CLKernel, devices)
5
6 from .CLKernelHelper import CLKernelHelper

/opt/anaconda3/envs/litenn/lib/python3.8/site-packages/litenn/core/minicl/init.py in
----> 1 from .CLDevice import CLDevice
2 from .CLBuffer import CLBuffer
3 from .CLDevicesBuffers import CLDevicesBuffers
4 from .CLKernel import CLKernel
5 from .devices import devices

/opt/anaconda3/envs/litenn/lib/python3.8/site-packages/litenn/core/minicl/CLDevice.py in
1 import numpy as np
----> 2 from .CLBuffer import CLBuffer
3 from .api import OpenCL as CL
4 from .CLShallowMode import CLShallowMode
5

/opt/anaconda3/envs/litenn/lib/python3.8/site-packages/litenn/core/minicl/CLBuffer.py in
1 import numpy as np
----> 2 from .api import OpenCL as CL
3 from .CLShallowMode import CLShallowMode
4
5 class CLBuffer:

/opt/anaconda3/envs/litenn/lib/python3.8/site-packages/litenn/core/minicl/api/OpenCL/init.py in
----> 1 from .OpenCL import (
2 BuildProgram,
3 BUILD_STATUS,
4 DEVICE_TYPE,
5 CreateBuffer,

/opt/anaconda3/envs/litenn/lib/python3.8/site-packages/litenn/core/minicl/api/OpenCL/OpenCL.py in
212 def name(self): return GetPlatformInfo(self, PLATFORM_INFO.PLATFORM_NAME)
213
--> 214 lib_GetPlatformIDs = lib.clGetPlatformIDs
215 lib_GetPlatformIDs.argtypes = cl_uint, POINTER(platform), POINTER(cl_uint)
216 lib_GetPlatformIDs.restype = ERROR

/opt/anaconda3/envs/litenn/lib/python3.8/ctypes/init.py in getattr(self, name)
392 if name.startswith('') and name.endswith(''):
393 raise AttributeError(name)
--> 394 func = self.getitem(name)
395 setattr(self, name, func)
396 return func

/opt/anaconda3/envs/litenn/lib/python3.8/ctypes/init.py in getitem(self, name_or_ordinal)
397
398 def getitem(self, name_or_ordinal):
--> 399 func = self._FuncPtr((name_or_ordinal, self))
400 if not isinstance(name_or_ordinal, int):
401 func.name = name_or_ordinal

AttributeError: dlsym(RTLD_DEFAULT, clGetPlatformIDs): symbol not found

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.