Skip to content

Commit 02c892b

Browse files
Update other test
1 parent 3f3c4f5 commit 02c892b

1 file changed

Lines changed: 0 additions & 19 deletions

File tree

idl/test/client-e2e/notebooks/notebook-to-pro-code/dl_training_example_output_all.pro

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ compile_opt idl2
88
;+ start ENVI with the UI
99
e = envi()
1010

11-
1211
; Get folders for input and output
1312

1413
;+ get this directory
@@ -25,10 +24,8 @@ timestamp = (strsplit(timestamp, '.', /extract))[0]
2524
modelDir = strjoin([thisDir, 'models-air', timestamp], path_sep())
2625
if ~file_test(modelDir, /directory) then file_mkdir, modelDir
2726

28-
2927
extension = '.dat'
3028

31-
3229
; Where we want the model to go
3330

3431
;+ best model, updated as we go with lowest validation loss
@@ -37,7 +34,6 @@ bestUri = modelDir + path_sep() + 'best.h5'
3734
;+ last mode (last epoch of training)
3835
lastUri = modelDir + path_sep() + 'last.h5'
3936

40-
4137
; Training parameters
4238

4339
;+ random seed for splitting data
@@ -52,7 +48,6 @@ bpr = 0.3
5248
;+ how many times we run through all positive examples of our features
5349
epochs = 100
5450

55-
5651
; Load data and split into training and validation buckets
5752

5853
; make list for ENVI DL rasters
@@ -80,7 +75,6 @@ idx = sort(randomu(seed, nFiles))
8075
training = rasters[*]
8176
validation = rasters[idx[-nValidation : -1]]
8277

83-
8478
; Create our training task and specify model parameters
8579

8680
; Get the task from the catalog of ENVITasks
@@ -99,41 +93,31 @@ Task.background_patch_ratio = bpr
9993
Task.output_model_uri = bestUri
10094
Task.output_last_model_uri = lastUri
10195

102-
10396
Task.execute
10497

105-
10698
Task.execute
10799

108-
109100
Task.execute
110101

111-
112102
orig = e.openRaster('D:\luno\sky-sat\mosaics\SkySatScene.ntf')
113103
raster = dlAutoPrepareRaster(orig)
114104
e.data.add, raster
115105

116-
117106
stop
118107

119-
120108
Task.execute
121109

122-
123110
Task.execute
124111

125-
126112
; Train! Now this will take a while, so don't close VSCode or run any other notebooks.
127113

128114
Task.execute
129115

130-
131116
; Optionally, classify some of our validation images so we can see what our results look like.
132117

133118
; stopped so we dont accidentally process all of our images which will take a while!
134119
stop
135120

136-
137121
; Specify the output folder and open our model
138122

139123
;+ specify output folder
@@ -142,13 +126,11 @@ validationDir = modelDir + path_sep() + 'validation'
142126
; make sure it exists
143127
if ~file_test(validationDir, /directory) then file_mkdir, validationDir
144128

145-
146129
; Open our model!
147130

148131
;+ restore the model to process our data with
149132
model = ENVITensorFlowObjectModel(lastUri)
150133

151-
152134
; Process our data!
153135

154136
; specify the number of files to process
@@ -184,5 +166,4 @@ foreach file, validationUris, i do begin
184166
; clean up
185167
raster.close
186168
endforeach
187-
188169
end

0 commit comments

Comments
 (0)