This file contains 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
# download dataset from json object | |
f = open(r'./ships-in-satellite-imagery/shipsnet.json') #download at http://vipnas.buitrongan.com:5000/sharing/Gd1gOIi9A | |
dataset = json.load(f) | |
f.close() | |
input_data = np.array(dataset['data']).astype('uint8') | |
output_data = np.array(dataset['labels']).astype('uint8') | |
input_data.shape |
This file contains 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
import json, sys, random | |
import numpy as np | |
import tensorflow as tf | |
import tensorflow.keras | |
from tensorflow.keras.models import Sequential | |
from tensorflow.keras.layers import Dense, Flatten, Activation | |
from tensorflow.keras.layers import Dropout | |
from tensorflow.keras.layers import Conv2D, MaxPooling2D | |
from tensorflow.keras.utils import to_categorical | |
from tensorflow.keras.optimizers import SGD |
NewerOlder