Merge pull request #671 from stweil/warnings

Fix some compiler warnings (unused variables)
This commit is contained in:
Egor Pugin 2017-01-21 14:58:11 +03:00 committed by GitHub
commit 1602234cd3
3 changed files with 0 additions and 5 deletions

View File

@ -593,7 +593,6 @@ bool DocumentCache::LoadDocuments(const GenericVector<STRING>& filenames,
// Adds document to the cache.
bool DocumentCache::AddToCache(DocumentData* data) {
inT64 new_memory = data->memory_used();
documents_.push_back(data);
return true;
}

View File

@ -55,8 +55,6 @@ const int kNumPagesPerBatch = 100;
const int kMinStartedErrorRate = 75;
// Error rate at which to transition to stage 1.
const double kStageTransitionThreshold = 10.0;
// How often to test for flipping.
const int kFlipTestRate = 20;
// Confidence beyond which the truth is more likely wrong than the recognizer.
const double kHighConfidence = 0.9375; // 15/16.
// Fraction of weight sign-changing total to constitute a definite improvement.
@ -856,7 +854,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)) {

View File

@ -553,7 +553,6 @@ void NetworkIO::EnsureBestLabel(int t, int label) {
// remainder to best_label.
int num_classes = NumFeatures();
float* targets = f_[t];
float enhancement = (1.0f - targets[label]) / 3.0f;
for (int c = 0; c < num_classes; ++c) {
if (c == label) {
targets[c] += (1.0 - targets[c]) * (2 / 3.0);