Add requirements file
This commit is contained in:
parent
7b02c4f746
commit
7f66120f25
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"python.pythonPath": "/usr/bin/python3.6"
|
||||
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
iris_model.h5
BIN
iris_model.h5
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,3 @@
|
|||
tensorflow
|
||||
django
|
||||
django-cors-headers
|
|
@ -17,12 +17,12 @@ train_x, test_x, train_y, test_y = train_test_split(x, y, test_size=0.2)
|
|||
# Building the model
|
||||
model = tf.keras.Sequential()
|
||||
|
||||
model.add(layers.Dense(8, activation='relu', input_dim=4))
|
||||
model.add(layers.Dense(20, activation='relu', input_dim=4))
|
||||
model.add(layers.Dense(3, activation='sigmoid'))
|
||||
|
||||
model.compile(optimizer='adam', loss='categorical_crossentropy',
|
||||
metrics=['accuracy'])
|
||||
# Training the model
|
||||
model.fit(train_x, train_y, validation_data=(test_x, test_y), epochs=2000)
|
||||
model.fit(train_x, train_y, validation_data=(test_x, test_y), epochs=1000)
|
||||
|
||||
model.save('iris_model.h5')
|
||||
|
|
Loading…
Reference in New Issue