Friday, 1 January 2021

Choosing the right deep learning model in Keras

I'm facing a real-time problem which has 4 features: Vmean, Vmedian, Vnow, VV. What I'm trying to do is:

for i in range(len(X)):
     model.fit(X[i], X[i+1])
     model.predict(X[i+1])

That is, I'm trying to predict the value of X[i+2] through X[i+1] and X[i], because one row is related with the next one and so on. This is my model:

def kerasModel():
    input_layer = keras.layers.Input(shape=(4, 1), name='input_shape')
    x = keras.layers.LSTM(100, name='lstm_0')(input_layer)
    x = keras.layers.Dropout(0.2, name='lstm_dropout')(x)
    x = keras.layers.Dense(64, name='x2')(x)
    output = keras.layers.Dense(4, activation='linear', name='x3')(x)
    model = keras.Model(inputs=input_layer, outputs=output)
    
    adam = keras.optimizers.Nadam(lr=0.005)
    model.compile(optimizer=adam, loss='mse')
    
    return model

But it is not working. It's not predicting next value as it should be doing. My question is: is there any paper or rules to make a good deep learning model based on your features? Plus, based in this problem, which could be a good model?



from Choosing the right deep learning model in Keras

How to Change HTML5 Color Input Inner Radius

Trying to make the native HTML5 color input into a simple round circle, seems like the border and padding can be manipulated which is a good thing, I am looking for a way to border-radius the inner color...

#color1{
  padding:10px;
  border:none;
  border-radius:10px;
}

#color2{
  background:none;
  border:none;
}
<input type="color" id="color1" />
<input type="color" id="color2" />


from How to Change HTML5 Color Input Inner Radius

How to make Intellij Idea's Intellisense work on C++ and Kotlin on a Flutter project?

Due to opening a Flutter project into Intellij Idea, that is, opening the folder that contains both an Android project and an iOS project, Intellij Idea does not recognize the Android gradle project and thus both C++ and Kotlin intellisense won't work. Additionally, logcat wont work: How to get logcat working on Intellij Idea on Flutter project?

A solution would be to open the android folder into another window, but this is not very good. Having everything on one window is much better, specially if you develop inside docker using the docker plugin.

Opening thins in Android Studio also has this effect and there's not even a Docker plugin there.

So, how can I use C++ and Kotlin intellisense on Intellij Idea in a Flutter project?



from How to make Intellij Idea's Intellisense work on C++ and Kotlin on a Flutter project?