pei2748 / linear-svm-with-pycuda Goto Github PK
View Code? Open in Web Editor NEWThis project forked from oo00oo00/linear-svm-with-pycuda
Examples of using PyCUDA with a linear SVM
This project forked from oo00oo00/linear-svm-with-pycuda
Examples of using PyCUDA with a linear SVM
Date: 2018-06-01 Author: WRF Description: This project demonstrates how PyCUDA can be used to build a linear support vector machine using the Huberized squared hinge loss. Setup (other than installing packages denoted in the scripts): - Access to GPU - Install NVIDIA GPU Computing Toolkit with CUDA v9.2: https://developer.nvidia.com/cuda-downloads - Install MS Visual Studio 2017 Community version (v14.14.26428 worked for me): https://www.visualstudio.com/downloads/ Notes: You may need to do the following: 1) In the file host_config.h found here, C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.2\include\crt change line 131 from: #if _MSC_VER < 1600 || _MSC_VER > 1913 to: #if _MSC_VER < 1600 This prevents an error being thrown by PyCUDA. Although this has let me use PyCUDA, I do not know it's other ramifications! 2) In %PYTHON%\Lib\site-packages\skcuda\cublas.py, you may need to manually set the location of the relevant cublas.dll file. E.g., dirname_DLL = 'C:\\Anaconda3\\DLLs' _libcublas = None for _libcublas_libname in _libcublas_libname_list: try: if sys.platform == 'win32': _libcublas = ctypes.windll.LoadLibrary(dirname_DLL + "\\" +_libcublas_libname) ------------------------------------------------------------------------------------------------------------------- DISCLAIMER: For anyone that wants to use this code, be aware that it's limited to the following: i) Subsetted models in one-vs-one fitting cannot be larger than 1024 records (i.e., to fit on a GPU block). E.g., your training design matrix could have shape (10M, 100), so long as each one-vs-one label pair has at most 1024 observations. ii) A small number of response categories, because of an unknown memory issue. In other words, too many response categories will likely eat up your RAM and crash your python kernel. I strongly suspect these issues can be resolved, but have been unable to do so with my limited python/GPU experience. If anyone has any recommendations, feel free to post them!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.