model_layers=list()
model_layers.append(keras.Input(shape=(df.shape[1]-1,1)))
i=0
history=40
blocks=2
dense_size=256
layers_per_block=2
filters_multiplier=2
kernel_size=4
optimizer="adam"
while(i<blocks):
j=0
while(j<layers_per_block):
model_layers.append(Conv1D(filters=filters_multiplier**(i+1),kernel_size=kernel_size, activation="elu")(model_layers[-1]))
j+=1
i+=1
model_layers.append(Flatten()(model_layers[-1]))
flat_hor_idx=len(model_layers)-1
model_layers.append(keras.Input(shape=(history,df.shape[1]-1)))
inp2_idx=len(model_layers)-1
i=0
while(i<blocks):
j=0
while(j<layers_per_block):
model_layers.append(Conv1D(filters=filters_multiplier**(i+1),kernel_size=kernel_size, activation="elu")(model_layers[-1]))
j+=1
i+=1
model_layers.append(Flatten()(model_layers[-1]))
model_layers.append(Concatenate()([model_layers[-1],model_layers[flat_hor_idx]]))
model_layers.append(Dense(dense_size)(model_layers[-1]))
model_layers.append(Dense(1)(model_layers[-1]))
Paste Hosted With By Wklejamy.pl