crop_wとcrop_hが違う値の時にTTAをやると出力がおかしくなるバグを修正 #43

This commit is contained in:
lltcggie 2016-09-11 14:06:32 +09:00
parent bb13740260
commit c7b4a6d4be

View File

@ -1050,7 +1050,10 @@ Waifu2x::eWaifu2xError Waifu2x::ReconstructByNet(std::shared_ptr<cNet> net, cons
if (i >= 4) if (i >= 4)
cv::flip(in, in, 1); // <20>¼Ž²”½“] cv::flip(in, in, 1); // <20>¼Ž²”½“]
ret = ProcessNet(net, crop_w, crop_h, use_tta, batch_size, in); const int cw = (rotateNum % 2 == 0) ? crop_w : crop_h;
const int ch = (rotateNum % 2 == 0) ? crop_h : crop_w;
ret = ProcessNet(net, cw, ch, use_tta, batch_size, in);
if (ret != Waifu2x::eWaifu2xError_OK) if (ret != Waifu2x::eWaifu2xError_OK)
return ret; return ret;