Init ptb
This commit is contained in:
BIN
PytorchBoot/templates/__pycache__/application.cpython-39.pyc
Normal file
BIN
PytorchBoot/templates/__pycache__/application.cpython-39.pyc
Normal file
Binary file not shown.
BIN
PytorchBoot/templates/__pycache__/config.cpython-39.pyc
Normal file
BIN
PytorchBoot/templates/__pycache__/config.cpython-39.pyc
Normal file
Binary file not shown.
15
PytorchBoot/templates/application.py
Normal file
15
PytorchBoot/templates/application.py
Normal file
@@ -0,0 +1,15 @@
|
||||
template = """from PytorchBoot.application import PytorchBootApplication
|
||||
|
||||
@PytorchBootApplication
|
||||
class Application:
|
||||
@staticmethod
|
||||
def start():
|
||||
'''
|
||||
call default or your custom runners here, code will be executed
|
||||
automatically when type "pytorch-boot run" or "ptb run" in terminal
|
||||
|
||||
example:
|
||||
Trainer("path_to_your_train_config").run()
|
||||
Evaluator("path_to_your_eval_config").run()
|
||||
'''
|
||||
"""
|
58
PytorchBoot/templates/config.py
Normal file
58
PytorchBoot/templates/config.py
Normal file
@@ -0,0 +1,58 @@
|
||||
template = """
|
||||
runners:
|
||||
general:
|
||||
seed: 0
|
||||
device: cuda
|
||||
cuda_visible_devices: "0,1,2,3,4,5,6,7"
|
||||
parallel: False
|
||||
|
||||
experiment:
|
||||
name: experiment_name
|
||||
root_dir: "experiments"
|
||||
use_checkpoint: False
|
||||
epoch: -1 # -1 stands for last epoch
|
||||
max_epochs: 5000
|
||||
save_checkpoint_interval: 1
|
||||
test_first: True
|
||||
|
||||
train:
|
||||
optimizer:
|
||||
type: adam
|
||||
lr: 0.0001
|
||||
losses: # loss type : weight
|
||||
loss_type_0: 1.0
|
||||
dataset:
|
||||
name: train_set_name
|
||||
source: train_set_source_name
|
||||
ratio: 1.0
|
||||
batch_size: 1
|
||||
num_workers: 1
|
||||
|
||||
test:
|
||||
frequency: 3 # test frequency
|
||||
dataset_list:
|
||||
- name: test_set_name_0
|
||||
source: train_set_source_name
|
||||
eval_list:
|
||||
- eval_func_name_0
|
||||
- eval_func_name_1
|
||||
ratio: 1.0
|
||||
batch_size: 1
|
||||
num_workers: 1
|
||||
|
||||
pipeline: pipeline_name
|
||||
|
||||
pipelines:
|
||||
pipeline_name_0:
|
||||
- module_name_0
|
||||
- module_name_1
|
||||
|
||||
datasets:
|
||||
dataset_source_name_0:
|
||||
dataset_source_name_1:
|
||||
|
||||
modules:
|
||||
module_name_0:
|
||||
module_name_1:
|
||||
|
||||
"""
|
Reference in New Issue
Block a user