BrainML is a machine learning library capable of implementing neural networks.
Project description
Code example for XOR problem:
##first import tensorflow
import tensorflow as tf
##second import BrainMl
import BrainMl as dl
from BrainMl.layers import Dense,Dropout
from BrainMl.optimizer import Optimizer,Adam
##from BrainMl.activation import Activator,relu,softmax
##define an empty model
model=dl.Model()
##define Sequential model and add layers
save=model.Sequential([
##Here we add 4 dense layers and a Dropout
Dense(4,activation="relu",shape=[2,2]),
Dense(8, activation="relu"),
Dense(2, activation="relu"),
Dropout(0.9),
Dense(1, activation="relu")
],name="model1")
## X is our data
X = [[0,0],[0,1],[1,0],[1,1]]
## y is our label
Y = [[0],[1],[1],[0]]
##we define an optimizer
optim=Adam(learning_rate=0.01)
##and compile the model along with optimizer
model.compile(optimizer=optim)
##than we start trainning the model
model.fit(X,Y,epochs=100,display=["all"])
##all-displays current epoch and error
##in list you can add "epoch"-to show just epoch or "error"-just for the error
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file BrainML-0.0.3-py3-none-any.whl.
File metadata
- Download URL: BrainML-0.0.3-py3-none-any.whl
- Upload date:
- Size: 9.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/2.7.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4f9ba75ea0cca09a70b4c2db85631d0bc6859cea38c1997c076945706c6d9677
|
|
| MD5 |
aee121f0d08c9b7bd012811eaf015e28
|
|
| BLAKE2b-256 |
06943114066f69d1efa2142524ffaab9fb8d8976fede20a079f9188d22e2ec1d
|