diff --git a/lstm/lstmrecognizer.cpp b/lstm/lstmrecognizer.cpp index babfe505ea..236455b411 100644 --- a/lstm/lstmrecognizer.cpp +++ b/lstm/lstmrecognizer.cpp @@ -280,7 +280,6 @@ bool LSTMRecognizer::RecognizeLine(const ImageData& image_data, bool invert, OutputStats(*outputs, &pos_min, &pos_mean, &pos_sd); if (invert && pos_min < 0.5) { // Run again inverted and see if it is any better. - float inv_scale; NetworkIO inv_inputs, inv_outputs; inv_inputs.set_int_mode(IsIntMode()); SetRandomSeed(); @@ -460,7 +459,6 @@ void LSTMRecognizer::DisplayForward(const NetworkIO& inputs, const char* window_name, ScrollView** window) { #ifndef GRAPHICS_DISABLED // do nothing if there's no graphics - int x_scale = network_->XScaleFactor(); Pix* input_pix = inputs.ToPix(); Network::ClearWindow(false, window_name, pixGetWidth(input_pix), pixGetHeight(input_pix), window); @@ -595,7 +593,6 @@ void LSTMRecognizer::LabelsViaThreshold(const NetworkIO& output, int width = output.Width(); int t = 0; // Skip any initial non-char. - int label = null_char_; while (t < width && NullIsBest(output, null_thr, null_char_, t)) { ++t; } @@ -688,7 +685,6 @@ BLOB_CHOICE_LIST* LSTMRecognizer::GetBlobChoices( int col, int row, bool debug, const NetworkIO& output, const UNICHARSET* target_unicharset, int x_start, int x_end, float score_ratio) { - int width = x_end - x_start; float rating = 0.0f, certainty = 0.0f; int label = output.BestChoiceOverRange(x_start, x_end, UNICHAR_SPACE, null_char_, &rating, &certainty); diff --git a/lstm/lstmtrainer.cpp b/lstm/lstmtrainer.cpp index c7defd0932..5865bc45b1 100644 --- a/lstm/lstmtrainer.cpp +++ b/lstm/lstmtrainer.cpp @@ -827,7 +827,6 @@ Trainability LSTMTrainer::PrepareForBackward(const ImageData* trainingdata, return UNENCODABLE; } targets->Resize(*fwd_outputs, network_->NumOutputs()); - double text_error = 100.0; LossType loss_type = OutputLossType(); if (loss_type == LT_SOFTMAX) { if (!ComputeTextTargets(*fwd_outputs, truth_labels, targets)) { diff --git a/lstm/networkio.cpp b/lstm/networkio.cpp index 4f29688cb0..b77f0ca373 100644 --- a/lstm/networkio.cpp +++ b/lstm/networkio.cpp @@ -696,7 +696,6 @@ void NetworkIO::MaxpoolTimeStep(int dest_t, const NetworkIO& src, int src_t, void NetworkIO::MaxpoolBackward(const NetworkIO& fwd, const GENERIC_2D_ARRAY& maxes) { ASSERT_HOST(!int_mode_); - int width = fwd.Width(); Zero(); StrideMap::Index index(fwd.stride_map_); do { diff --git a/lstm/parallel.cpp b/lstm/parallel.cpp index adb9d84f15..516fe33a1a 100644 --- a/lstm/parallel.cpp +++ b/lstm/parallel.cpp @@ -89,7 +89,6 @@ void Parallel::Forward(bool debug, const NetworkIO& input, src_transpose = &transposed_input_; } // Run each network, putting the outputs into result. - int input_offset = 0; int out_offset = 0; for (int i = 0; i < stack_size; ++i) { stack_[i]->Forward(debug, input, src_transpose, scratch, result); @@ -126,7 +125,6 @@ bool Parallel::Backward(bool debug, const NetworkIO& fwd_deltas, out_deltas.init_to_size(stack_size, NetworkScratch::IO()); // Split the forward deltas for each stack element. int feature_offset = 0; - int out_offset = 0; for (int i = 0; i < stack_.size(); ++i) { int num_features = stack_[i]->NumOutputs(); in_deltas[i].Resize(fwd_deltas, num_features, scratch); @@ -153,7 +151,6 @@ bool Parallel::Backward(bool debug, const NetworkIO& fwd_deltas, // back_deltas. NetworkScratch::IO out_deltas; int feature_offset = 0; - int out_offset = 0; for (int i = 0; i < stack_.size(); ++i) { int num_features = stack_[i]->NumOutputs(); in_deltas->CopyUnpacking(fwd_deltas, feature_offset, num_features);