mirror of
https://github.com/Azure/MachineLearningNotebooks.git
synced 2025-12-23 11:02:39 -05:00
update samples from Release-108 as a part of 1.35.0 SDK stable release
This commit is contained in:
@@ -4,15 +4,15 @@ import sys
|
||||
|
||||
def convert(imgf, labelf, outf, n):
|
||||
f = open(imgf, "rb")
|
||||
l = open(labelf, "rb")
|
||||
temp = open(labelf, "rb")
|
||||
o = open(outf, "w")
|
||||
|
||||
f.read(16)
|
||||
l.read(8)
|
||||
temp.read(8)
|
||||
images = []
|
||||
|
||||
for i in range(n):
|
||||
image = [ord(l.read(1))]
|
||||
image = [ord(temp.read(1))]
|
||||
for j in range(28 * 28):
|
||||
image.append(ord(f.read(1)))
|
||||
images.append(image)
|
||||
@@ -21,7 +21,7 @@ def convert(imgf, labelf, outf, n):
|
||||
o.write(",".join(str(pix) for pix in image) + "\n")
|
||||
f.close()
|
||||
o.close()
|
||||
l.close()
|
||||
temp.close()
|
||||
|
||||
|
||||
mounted_input_path = sys.argv[1]
|
||||
|
||||
Reference in New Issue
Block a user