setup 파일 조정
This commit is contained in:
jung-geun
2023-10-18 14:55:25 +09:00
parent 082a32b5ef
commit eb8daffdea
2 changed files with 6 additions and 21 deletions

View File

@@ -32,13 +32,6 @@ def get_data():
return x_train, y_train, x_test, y_test return x_train, y_train, x_test, y_test
def get_data_test():
(x_train, y_train), (x_test, y_test) = fashion_mnist.load_data()
x_test = x_test.reshape((10000, 28, 28, 1))
return x_test, y_test
class _batch_generator: class _batch_generator:
def __init__(self, x, y, batch_size: int = 32): def __init__(self, x, y, batch_size: int = 32):
self.batch_size = batch_size self.batch_size = batch_size
@@ -54,21 +47,13 @@ class _batch_generator:
return self.dataset[self.index][0], self.dataset[self.index][1] return self.dataset[self.index][0], self.dataset[self.index][1]
def make_model(): # BEGIN: 5f8d9bcejpp
model = Sequential() from keras.applications.resnet50 import ResNet50
model.add(
Conv2D(32, kernel_size=(5, 5), activation="relu",
input_shape=(28, 28, 1))
)
model.add(MaxPooling2D(pool_size=(3, 3)))
model.add(Conv2D(64, kernel_size=(3, 3), activation="relu"))
model.add(MaxPooling2D(pool_size=(2, 2)))
model.add(Dropout(0.25))
model.add(Flatten())
model.add(Dense(128, activation="relu"))
model.add(Dense(10, activation="softmax"))
def make_model():
model = ResNet50(weights=None, input_shape=(28, 28, 1), classes=10)
return model return model
# END: 5f8d9bcejpp
model = make_model() model = make_model()

View File

@@ -32,7 +32,7 @@ setup(
"Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.8",
"programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.10",
], ],
) )