Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

your "blob" is a 4d tensor, containing 3 seperate grayscale channel images,

print(blob.shape)

(1, 3, 300, 300)

so you need to reshape it like this:

# a horizontal strip with 3 one-channel images.
blobb = blob.reshape(blob.shape[2] * blob.shape[1], blob.shape[3], 1) 
print(blobb.shape)

(900, 300, 1)

image description

your "blob" is a 4d tensor, containing 3 seperate grayscale channel images,

print(blob.shape)

(1, 3, 300, 300)

so you need to reshape it like this:this, for visualization:

# a horizontal strip with 3 one-channel images.
blobb = blob.reshape(blob.shape[2] * blob.shape[1], blob.shape[3], 1) 
print(blobb.shape)

(900, 300, 1)

image description