Created
June 12, 2020 08:41
-
-
Save trongan93/46716c85d1243b081e9fcb17dac94981 to your computer and use it in GitHub Desktop.
ship_detection_preparedata
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# output encoding | |
y = tensorflow.keras.utils.to_categorical(output_data, 2) | |
# shuffle all indexes | |
indexes = np.arange(2800) | |
np.random.shuffle(indexes) | |
X_train = X[indexes].transpose([0,2,3,1]) | |
y_train = y[indexes] | |
# normalization | |
X_train = X_train / 255 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment