Comments (4)
Unfortunately there really is no good high-level documentation at this point. This is on my TODO list, but is likely to take some time as there's a lot to document ;)
For your particular case, there are two examples of how you might go about building a full network in the models section.
In general, models using this code are going to be quite slow in comparison to any keras/tf/torch/theano implementations - the code here is optimized for readability over speed / efficiency. That said, I think it's a great idea to have some simple examples to show how the NN code corresponds to other packages.
from numpy-ml.
In general, if you want to implement a model, you'll probably want the following methods as a bare-minimum:
_build_network(self, ...):
# initialize the network layers and store them within an
# OrderedDict so you can reliably iterate over them during the
# forward / backward passes
forward(self, X):
# perform a forward pass. this is where the specific model architecture comes
# into play, since you'll need to define how outputs from early layers flow to
# inputs of subsequent layers
backward(self, dLdy):
# perform a backward pass. again, the route the gradients take through the network
# will be specific to the particular model architecture
from numpy-ml.
So basically numpy-ml follows some kind of PyTorch
way of building a model, right?
from numpy-ml.
Yeah, more or less. The major difference is that this code won't have a built-in backward
method - you have to implement it yourself for each model
from numpy-ml.
Related Issues (20)
- Using numpy.tensordot for Conv2D HOT 1
- error in DecisionTree
- Bug in transfer learning
- Bug in initializers init_from_dict()
- [Question] Gradient of Gradient Penalty in WGAN-GP.
- Naive Bayes HOT 3
- Feature Request: Clustering Kmeans (hard and soft version) HOT 2
- Feature Request: Online Linear Regression HOT 7
- Feature request: Accept multiple samples for online least squares HOT 1
- Best choice for my use case? HOT 1
- `numpy_ml.linear_model.LinearRegression.predict()` generates `ValueError` when used with copy-pasted code, but pip installed version works as expected!! HOT 1
- neural nets optimizer shape mismatch during backward pass
- Import of collections.Hashable fails in Python 3.10 HOT 3
- Columns and DataType Not Explicitly Set on line 228 of rl_utils.py
- Feature request: save/load model to/from json
- Question to improve the code.
- Declare your version of modules
- Automatic diferentiation for neural networks
- no 'load_dataset' in numpy_mL
- Example of MLP architecture
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from numpy-ml.