forked from mindspore-Ecosystem/mindspore
fix nanset mstype
This commit is contained in:
parent
478200d2fe
commit
56bdedb826
|
@ -214,7 +214,12 @@ static Status JpegReadScanlines(jpeg_decompress_struct *const cinfo, int max_sca
|
|||
std::vector<JSAMPLE> scanline(scanline_size);
|
||||
JSAMPLE *scanline_ptr = &scanline[0];
|
||||
while (cinfo->output_scanline < static_cast<unsigned int>(max_scanlines_to_read)) {
|
||||
int num_lines_read = jpeg_read_scanlines(cinfo, &scanline_ptr, 1);
|
||||
int num_lines_read = 0;
|
||||
try {
|
||||
num_lines_read = jpeg_read_scanlines(cinfo, &scanline_ptr, 1);
|
||||
} catch (std::runtime_error &e) {
|
||||
RETURN_STATUS_UNEXPECTED("jpeg_read_scanlines error.");
|
||||
}
|
||||
if (cinfo->out_color_space == JCS_CMYK && num_lines_read > 0) {
|
||||
for (int i = 0; i < crop_w; ++i) {
|
||||
int cmyk_pixel = 4 * i + offset;
|
||||
|
|
|
@ -25,6 +25,7 @@ from mindspore.train.callback import ModelCheckpoint, CheckpointConfig, LossMoni
|
|||
from mindspore.train.model import Model
|
||||
from mindspore.train.serialization import load_checkpoint, load_param_into_net
|
||||
from mindspore.common import set_seed
|
||||
from mindspore.common import dtype as mstype
|
||||
|
||||
from src.config import nasnet_a_mobile_config_gpu as cfg
|
||||
from src.dataset import create_dataset
|
||||
|
|
Loading…
Reference in New Issue