https://github.com/openml/openml-mxnet
MXNet extension for openml
https://github.com/openml/openml-mxnet
Last synced: 12 months ago
JSON representation
MXNet extension for openml
- Host: GitHub
- URL: https://github.com/openml/openml-mxnet
- Owner: openml
- License: bsd-3-clause
- Created: 2019-11-25T14:26:49.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-05-24T00:18:54.000Z (about 6 years ago)
- Last Synced: 2025-06-07T11:07:53.686Z (about 1 year ago)
- Language: Python
- Size: 17.6 KB
- Stars: 0
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# MXNet extension for OpenML python
MXNet extension for [openml-python API](https://github.com/openml/openml-python).
#### Installation Instructions:
`pip install openml-keras`
PyPi link https://pypi.org/project/openml-mxnet/
#### Usage
Import openML libraries
```python
import openml
import openml_mxnet
```
Create a MXNet model
```python
model = mxnet.gluon.nn.HybridSequential()
with model.name_scope():
model.add(mxnet.gluon.nn.BatchNorm())
model.add(mxnet.gluon.nn.Dense(units=1024, activation="relu"))
model.add(mxnet.gluon.nn.Dropout(rate=0.4))
model.add(mxnet.gluon.nn.Dense(units=2))
model.hybridize()
```
Download the task from openML and run the model on task.
```python
task = openml.tasks.get_task(3573)
run = openml.runs.run_model_on_task(model, task, avoid_duplicate_runs=False)
run.publish()
print('URL for run: %s/run/%d' % (openml.config.server, run.run_id))
```