Made a neural network using tensor flows that was supposed matches an Ip to one of the 7 type of vulnerabilities and gives out what type of vulnerability that IP has.
model = tf.keras.models.Sequential([ tf.keras.layers.Flatten(), tf.keras.layers.Dense(50, activation=tf.nn.relu), tf.keras.layers.Dense(7, activation=tf.nn.softmax) ]) model.compile(optimizer='adam', loss='sparse_categorical_crossentropy', metrics=['accuracy']) model.fit(xs, ys, epochs=500)
The output of
print(model.predict()) when this command is executed should be one of the numbers from 1 to 7 but the out put its gives is
[[0.22288103 0.20282331 0.36847615 0.11339897 0.04456346 0.02391759 0.02393949]]
I can't seem to figure out what the problem is.