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
Metadata
Release files for BrainML 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| BrainML-0.0.3-py3-none-any.whl | Python 3 | none | any | Details for BrainML-0.0.3-py3-none-any.whl |
Release files / BrainML-0.0.3-py3-none-any.whl
| Download URL | BrainML-0.0.3-py3-none-any.whl |
|---|---|
| Size | 9.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4f9ba75ea0cca09a70b4c2db85631d0bc6859cea38c1997c076945706c6d9677
|
|
BLAKE2b-256 checksum How to use checksums |
06943114066f69d1efa2142524ffaab9fb8d8976fede20a079f9188d22e2ec1d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Security for BrainML 0.0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.