标签:sse mpi code size fit model nbsp print vat
import numpy as np import tensorflow as tf x = np.array([[1, 0], [0, 1], [1, 1], [0, 0]]) y = np.array([[1], [1], [0], [0]]) model = tf.keras.models.Sequential([ tf.keras.layers.Dense(32, activation=‘relu‘, input_dim=2), tf.keras.layers.Dense(1, activation=‘sigmoid‘) ]) model.compile(optimizer=‘adam‘, loss=‘binary_crossentropy‘, metrics=[‘accuracy‘]) model.fit(x, y, batch_size=1, epochs=1600) predict = model.predict(x) print(predict)
标签:sse mpi code size fit model nbsp print vat
原文地址:https://www.cnblogs.com/yytxdy/p/11519561.html