This website works better with JavaScript.
Home
Issues
Pull Requests
Milestones
AI流水线
Repositories
Datasets
Forum
实训
竞赛
大数据
AI开发
Register
Sign In
Huawei_Technology
/
mindspore
Not watched
Unwatch
Watch all
Watch but not notify
1
Star
0
Fork
0
Code
Releases
13
Wiki
evaluate
Activity
Issues
0
Pull Requests
0
Datasets
Model
Cloudbrain
HPC
Browse Source
fix: imagenet to mindrecord failed when the pic size is 0
tags/v0.3.0-alpha
jonyguo
5 years ago
parent
e23a663f52
commit
b4151efe81
1 changed files
with
3 additions
and
0 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+3
-0
mindspore/mindrecord/tools/imagenet_to_mr.py
+ 3
- 0
mindspore/mindrecord/tools/imagenet_to_mr.py
View File
@@ -111,6 +111,9 @@ class ImageNetToMR:
image_file = open(file_name, "rb")
image_bytes = image_file.read()
image_file.close()
if not image_bytes:
logger.warning("The image file: {} is invalid.".format(file_name))
continue
data["data"] = image_bytes
yield data
Write
Preview
Loading…
Cancel
Save