Categories
Misc

XOR Problem with MLP

Hi guys, I’m trying to reproduce this mlp in tf (constraining it to have only one hidden layer with 2 units). However, like in playground tf, many times do not converge to global maxima. I think is due to weight initialization, tried xavier and he initializations but no success. The following piece of code is the model in tf keras.

model = tf.keras.models.Sequential([ Dense(units=2, activation='sigmoid', input_shape=(2,)), Dense(units=1, activation='sigmoid') 

])

Any help, would be appreciated. Thanks.

https://preview.redd.it/otv9rmbrtr251.png?width=1375&format=png&auto=webp&s=6757653b702f45a728dd032a89368fedbd6968e2

submitted by /u/Idea_Cultural
[visit reddit] [comments]

Leave a Reply

Your email address will not be published. Required fields are marked *