Skip to content

Commit

Permalink
Fix check for images which are too small to scale
Browse files Browse the repository at this point in the history
Images with width == min_width are not too small.

Signed-off-by: Stefan Weil <[email protected]>
  • Loading branch information
stweil committed Feb 15, 2019
1 parent 5fb2509 commit 862322c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/lstm/input.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// File: input.cpp
// Description: Input layer class for neural network implementations.
// Author: Ray Smith
// Created: Thu Mar 13 09:10:34 PDT 2014
//
// (C) Copyright 2014, Google Inc.
// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -93,7 +92,7 @@ Pix* Input::PrepareLSTMInputs(const ImageData& image_data,
tprintf("Bad pix from ImageData!\n");
return nullptr;
}
if (width <= min_width || height < min_width) {
if (width < min_width || height < min_width) {
tprintf("Image too small to scale!! (%dx%d vs min width of %d)\n", width,
height, min_width);
pixDestroy(&pix);
Expand Down

0 comments on commit 862322c

Please sign in to comment.