mirror of
https://github.com/wassname/pytorch-lightning.git
synced 2026-09-07 17:00:22 +08:00
Update README.md
This commit is contained in:
@@ -4,7 +4,11 @@ The Keras for ML-researchers in PyTorch.
|
||||
## Usage
|
||||
To use lightning do 2 things:
|
||||
1. [Define a trainer](https://github.com/williamFalcon/pytorch-lightning/blob/master/pytorch_lightning/trainer_main.py) (which will run ALL your models).
|
||||
2. [Define a model](https://github.com/williamFalcon/pytorch-lightning/blob/master/pytorch_lightning/models/sample_model_template/model_template.py).
|
||||
2. [Define a model](https://github.com/williamFalcon/pytorch-lightning/blob/master/pytorch_lightning/models/sample_model_template/model_template.py).
|
||||
|
||||
### Example:
|
||||
|
||||
### Define the trainer
|
||||
|
||||
```python
|
||||
# trainer.py
|
||||
@@ -56,7 +60,8 @@ model = My_Model()
|
||||
trainer.fit(model)
|
||||
```
|
||||
|
||||
next define a model that implements these 10 functions:
|
||||
### Define the model
|
||||
|
||||
```python
|
||||
import torch.nn as nn
|
||||
|
||||
|
||||
Reference in New Issue
Block a user