Add requirements file

This commit is contained in:
= 2019-05-06 14:45:47 +02:00
parent 7b02c4f746
commit 7f66120f25
14 changed files with 8 additions and 2 deletions

3
.vscode/settings.json vendored Normal file
View File

@ -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.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

0
manage.py Executable file → Normal file
View File

3
requirements.txt Normal file
View File

@ -0,0 +1,3 @@
tensorflow
django
django-cors-headers

View File

@ -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')