Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

preprocessing image (pixel to vector conversion)

# Reshape the training examples 
train_x_flatten = train_x_orig.reshape(train_x_orig.shape[0], -1).T   
# The "-1" makes reshape flatten the remaining dimensions

# Standardize data to have feature values between 0 and 1.
train_x = train_x_flatten/255.
 
PREVIOUS NEXT
Tagged: #preprocessing #image #vector
ADD COMMENT
Topic
Name
7+2 =