From fede6ca1dd0077ff509d84bd24028cc7a93bb119 Mon Sep 17 00:00:00 2001 From: StevenLiuWen Date: Tue, 13 Mar 2018 03:28:06 -0400 Subject: first commit --- Codes/flownet2/src/flownet_c/train.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 Codes/flownet2/src/flownet_c/train.py (limited to 'Codes/flownet2/src/flownet_c/train.py') diff --git a/Codes/flownet2/src/flownet_c/train.py b/Codes/flownet2/src/flownet_c/train.py new file mode 100644 index 0000000..9296ac7 --- /dev/null +++ b/Codes/flownet2/src/flownet_c/train.py @@ -0,0 +1,19 @@ +from ..dataloader import load_batch +from ..dataset_configs import FLYING_CHAIRS_DATASET_CONFIG +from ..training_schedules import LONG_SCHEDULE +from .flownet_c import FlowNetC + +# Create a new network +net = FlowNetC() + +# Load a batch of data +input_a, input_b, flow = load_batch(FLYING_CHAIRS_DATASET_CONFIG, 'sample', net.global_step) + +# Train on the data +net.train( + log_dir='./logs/flownet_c', + training_schedule=LONG_SCHEDULE, + input_a=input_a, + input_b=input_b, + flow=flow +) -- cgit v1.2.3-70-g09d2