Dean commited on
Commit
ad95853
1 Parent(s): 7200298

Training for 1 epoch, still need to fix evaluation step

Browse files
Files changed (4) hide show
  1. dvc.lock +23 -11
  2. logs/train_metrics.csv +0 -0
  3. logs/train_params.yml +25 -0
  4. src/code/eval.py +6 -3
dvc.lock CHANGED
@@ -13,21 +13,33 @@ process_data:
13
  size: 2626
14
  outs:
15
  - path: src/data/processed/
16
- md5: 38e5a1b51dfd29c0f313779b2f3d4540.dir
17
- size: 234696354
18
  nfiles: 2898
19
  train:
20
- cmd: python3 src/code/training.py src/data/processed
21
  deps:
 
 
 
 
 
 
22
  - path: src/code/training.py
23
- md5: 9634e85cffa3cf72d3d3d7739e40969e
24
- size: 1645
25
- - path: src/data/processed/
26
- md5: d98a9647a37ab431bfa35815eb4afda0.dir
27
- size: 232903470
28
- nfiles: 2898
29
  outs:
 
 
 
 
 
 
30
  - path: src/models/
31
- md5: 18d26ed378b1b5ac61425afe153fc076.dir
32
- size: 494926829
33
  nfiles: 1
 
13
  size: 2626
14
  outs:
15
  - path: src/data/processed/
16
+ md5: 9a1f43f46e8b1c387532e994e721d57d.dir
17
+ size: 197717291
18
  nfiles: 2898
19
  train:
20
+ cmd: python3 src/code/training.py src/data/processed/train
21
  deps:
22
+ - path: src/code/custom_data_loading.py
23
+ md5: e04501397e3333bcec07eb8ef633b234
24
+ size: 2172
25
+ - path: src/code/params.yml
26
+ md5: 2263ca2167c1bb4b0f53a9aedb5f238e
27
+ size: 217
28
  - path: src/code/training.py
29
+ md5: e3dff7f4b59e4ebf818d7631d3e6803a
30
+ size: 1683
31
+ - path: src/data/processed/train
32
+ md5: 9956d748dcadc3abadd1ff966a6e2b92.dir
33
+ size: 109120921
34
+ nfiles: 1590
35
  outs:
36
+ - path: logs/train_metrics.csv
37
+ md5: 3504c0db314c5d285f3254f198a85a09
38
+ size: 103963
39
+ - path: logs/train_params.yml
40
+ md5: a2663346b17d042e5da48991fcf62771
41
+ size: 886
42
  - path: src/models/
43
+ md5: 8969d16fb5b908cbfb6b54dffbf20efc.dir
44
+ size: 494926837
45
  nfiles: 1
logs/train_metrics.csv ADDED
The diff for this file is too large to render. See raw diff
 
logs/train_params.yml ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ DAGsHubLogger: true
2
+ Learner: <fastai.learner.Learner object at 0x7f949b510cc0>
3
+ ParamScheduler: true
4
+ ProgressCallback: true
5
+ Recorder: {add_time: true, train_metrics: false, valid_metrics: true}
6
+ TrainEvalCallback: true
7
+ batch per epoch: 159
8
+ batch size: 4
9
+ dataset.tfms: '[Pipeline: PILBase.create, Pipeline: get_y_fn -> PILBase.create]'
10
+ device: cuda
11
+ dls.after_batch: "Pipeline: IntToFloatTensor -- {'div': 255.0, 'div_mask': 1} -> Normalize\
12
+ \ -- {'mean': tensor([[[[0.4850]],\n\n [[0.4560]],\n\n [[0.4060]]]],\
13
+ \ device='cuda:0'), 'std': tensor([[[[0.2290]],\n\n [[0.2240]],\n\n \
14
+ \ [[0.2250]]]], device='cuda:0'), 'axes': (0, 2, 3)}"
15
+ dls.after_item: 'Pipeline: ToTensor'
16
+ dls.before_batch: 'Pipeline: '
17
+ frozen: true
18
+ frozen idx: 2
19
+ input 1 dim 1: 4
20
+ input 1 dim 2: 3
21
+ input 1 dim 3: 480
22
+ input 1 dim 4: 640
23
+ model parameters: 41221268
24
+ n_inp: 1
25
+ success: true
src/code/eval.py CHANGED
@@ -29,10 +29,13 @@ if __name__ == "__main__":
29
  learner = learner.load('model')
30
 
31
  print("Running model on test data...")
32
- inputs, predictions, targets, decoded = learner.get_preds(dl=test_dl,
33
- with_input=True,
34
- with_decoded=True)
 
 
35
  # FastAI magic to retrieve image values
 
36
  inputs = (inputs,)
37
  decoded_predictions = learner.dls.decode(inputs + tuplify(decoded))[1]
38
  decoded_targets = learner.dls.decode(inputs + tuplify(targets))[1]
 
29
  learner = learner.load('model')
30
 
31
  print("Running model on test data...")
32
+ inputs = learner.get_preds(dl=test_dl,
33
+ with_input=True,
34
+ with_decoded=True,
35
+ save_preds=Path('src/eval/preds'),
36
+ save_targs=Path('src/eval/targs'))[0]
37
  # FastAI magic to retrieve image values
38
+ print("Decoding test data...")
39
  inputs = (inputs,)
40
  decoded_predictions = learner.dls.decode(inputs + tuplify(decoded))[1]
41
  decoded_targets = learner.dls.decode(inputs + tuplify(targets))[1]