-
Notifications
You must be signed in to change notification settings - Fork 0
/
models.py
35 lines (30 loc) · 1.11 KB
/
models.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import random as rn
import numpy as np
from keras.layers import Activation, Average, Dense, Dropout, Input
from keras.models import Model
from utils import *
RUN_ENSAMBLE = True
def model_1(input: int, output: int):
input = Input(shape=(input,))
x = Dense(40, activation = 'relu')(input)
#x = Dense(9, activation = 'relu')(x)
x = Dropout(0.2)(x)
output = Dense(output, activation = 'relu')(x)
model = Model(inputs=input, outputs=output, name="MODEL1")
return model
def model_2(input:int, output: int):
input = Input(shape=(input,))
x = Dense(15, activation = 'relu')(input)
x = Dense(9, activation = 'relu')(x)
x = Dropout(0.3)(x)
output = Dense(output, activation = 'sigmoid')(x)
model = Model(inputs=input, outputs=output, name="MODEL2")
return model
def model_3(input:int, output: int):
input = Input(shape=(input,))
x = Dense(50, activation = 'sigmoid')(input)
x = Dense(32, activation = 'sigmoid')(x)
x = Dropout(0.2)(x)
output = Dense(output, activation = 'sigmoid')(x)
model = Model(inputs=input, outputs=output, name="MODEL3")
return model