You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.
I was trying to use CIFAR dataset to train a mobilenet, since the origin size is 32x32 so I resize them to 224x224 which is the size of the mobilenet input:
def ExtractImageAndLabel(path,file):
with open(path+file, 'rb') as f:
data = cPickle.load(f)
images = data['data']
images = np.reshape(images, (10000, 3, 32, 32))
images_resize = mx.nd.zeros(shape=(10000, 3, 224, 224))
imagearray = mx.nd.array(images)
for i, img in enumerate(imagearray):
img=mx.nd.transpose(img,(2,1,0))
images_rs = mx.image.imresize(img,224,224)
images_resize[i]=mx.nd.transpose(images_rs,(2,1,0))
labels = data['labels']
labelarray = mx.nd.array(labels)
return images_resize, labelarray_
but after I resize them, I will encounter this problem: mxnet_source/dmlc-core/include/dmlc/./logging.h:308: [16:20:13] include/mxnet/././tensor_blob.h:275: Check failed: this->shape_.Size() == shape.Size() (4515840000 vs. 220872704) TBlob.get_with_shape: new and old shape do not match total elements
if I did not resize the image, it will be ok, and I check the meomery use, seems a memory leak happened, my computer has 64GB memory, the program will use them all.
with the latest code, I don't see the issue "Check failed: this->shape_.Size() == shape.Size() (4515840000 vs. 220872704) TBlob.get_with_shape: new and old shape do not match total elements".
Could you share the system configuration on which you see this issue?
I was trying to use CIFAR dataset to train a mobilenet, since the origin size is 32x32 so I resize them to 224x224 which is the size of the mobilenet input:
but after I resize them, I will encounter this problem:
mxnet_source/dmlc-core/include/dmlc/./logging.h:308: [16:20:13] include/mxnet/././tensor_blob.h:275: Check failed: this->shape_.Size() == shape.Size() (4515840000 vs. 220872704) TBlob.get_with_shape: new and old shape do not match total elements
if I did not resize the image, it will be ok, and I check the meomery use, seems a memory leak happened, my computer has 64GB memory, the program will use them all.
the other parts of my script is:
can any one help?
The text was updated successfully, but these errors were encountered: