Skip to content

Commit 465e2de

Browse files
committed
lstm: Remove unused constant and unused local variables
This fixes three compiler warnings. Signed-off-by: Stefan Weil <[email protected]>
1 parent 134a253 commit 465e2de

File tree

2 files changed

+0
-4
lines changed

2 files changed

+0
-4
lines changed

lstm/lstmtrainer.cpp

-3
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,6 @@ const int kNumPagesPerBatch = 100;
5555
const int kMinStartedErrorRate = 75;
5656
// Error rate at which to transition to stage 1.
5757
const double kStageTransitionThreshold = 10.0;
58-
// How often to test for flipping.
59-
const int kFlipTestRate = 20;
6058
// Confidence beyond which the truth is more likely wrong than the recognizer.
6159
const double kHighConfidence = 0.9375; // 15/16.
6260
// Fraction of weight sign-changing total to constitute a definite improvement.
@@ -856,7 +854,6 @@ Trainability LSTMTrainer::PrepareForBackward(const ImageData* trainingdata,
856854
return UNENCODABLE;
857855
}
858856
targets->Resize(*fwd_outputs, network_->NumOutputs());
859-
double text_error = 100.0;
860857
LossType loss_type = OutputLossType();
861858
if (loss_type == LT_SOFTMAX) {
862859
if (!ComputeTextTargets(*fwd_outputs, truth_labels, targets)) {

lstm/networkio.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,6 @@ void NetworkIO::EnsureBestLabel(int t, int label) {
553553
// remainder to best_label.
554554
int num_classes = NumFeatures();
555555
float* targets = f_[t];
556-
float enhancement = (1.0f - targets[label]) / 3.0f;
557556
for (int c = 0; c < num_classes; ++c) {
558557
if (c == label) {
559558
targets[c] += (1.0 - targets[c]) * (2 / 3.0);

0 commit comments

Comments
 (0)