Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dlib
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
钟尚武
dlib
Commits
3793e29e
Commit
3793e29e
authored
Jan 22, 2017
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added comments about test_one_step()
parent
c20c11af
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
dnn_introduction2_ex.cpp
examples/dnn_introduction2_ex.cpp
+9
-0
No files found.
examples/dnn_introduction2_ex.cpp
View file @
3793e29e
...
@@ -303,7 +303,16 @@ int main(int argc, char** argv) try
...
@@ -303,7 +303,16 @@ int main(int argc, char** argv) try
mini_batch_labels
.
push_back
(
training_labels
[
idx
]);
mini_batch_labels
.
push_back
(
training_labels
[
idx
]);
}
}
// Tell the trainer to update the network given this mini-batch
trainer
.
train_one_step
(
mini_batch_samples
,
mini_batch_labels
);
trainer
.
train_one_step
(
mini_batch_samples
,
mini_batch_labels
);
// You can also feed validation data into the trainer by periodically
// calling trainer.test_one_step(samples,labels). Unlike train_one_step(),
// test_one_step() doesn't modify the network, it only computes the testing
// error which it records internally. This testing error will then be print
// in the verbose logging and will also determine when the trainer's
// automatic learning rate shrinking happens. Therefore, test_one_step()
// can be used to perform automatic early stopping based on held out data.
}
}
// When you call train_one_step(), the trainer will do its processing in a
// When you call train_one_step(), the trainer will do its processing in a
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment