mirror of
https://github.com/wassname/pytorch-lightning.git
synced 2026-09-09 11:32:07 +08:00
CI: split tests-examples (#990)
* CI: split tests-examples * tests without template * comment depends * CircleCI typo * add doctest * update test req. * CI tests * setup macOS * longer train * lover pred acc * fix model * rename default model * lower tests acc * typo * imports * fix test optimizer * update calls * fix Win * lower Drone image * fix call * pytorch image * fix test * add dev image * add dev image * update image * drone volume * lint * update test notes * rename tests/models >> tests/base * group models * conftest * optim imports * typos * fix import * fix tests * install AMP * tests * fix import
This commit is contained in:
@@ -19,7 +19,24 @@ from pytorch_lightning.core import LightningModule
|
||||
|
||||
class LightningTemplateModel(LightningModule):
|
||||
"""
|
||||
Sample model to show how to define a template
|
||||
Sample model to show how to define a template.
|
||||
|
||||
Example:
|
||||
|
||||
>>> # define simple Net for MNIST dataset
|
||||
>>> params = dict(
|
||||
... drop_prob=0.2,
|
||||
... batch_size=2,
|
||||
... in_features=28 * 28,
|
||||
... learning_rate=0.001 * 8,
|
||||
... optimizer_name='adam',
|
||||
... data_root='./datasets',
|
||||
... out_features=10,
|
||||
... hidden_dim=1000,
|
||||
... )
|
||||
>>> from argparse import Namespace
|
||||
>>> hparams = Namespace(**params)
|
||||
>>> model = LightningTemplateModel(hparams)
|
||||
"""
|
||||
|
||||
def __init__(self, hparams):
|
||||
|
||||
Reference in New Issue
Block a user