Checking Whether Given Logistic Regression Classifier classifies data
check it

import keras
from keras.layers import *

X = np.array([[0,0], [0,1], [1,0], [1,1]])
Y = np.array([[0], [0], [0], [1]])

input = Input(shape=(2,))
output = Dense(1, activation='sigmoid')(input)
model = keras.Model(input, output)

model.compile(keras.optimizers.Adam(1e0), 'binary_crossentropy', metrics=['acc'])
model.fit(X, Y, epochs=10, batch_size=4, verbose=1)


which produces 

Epoch 1/10
4/4 [==============================] - 0s 52ms/step - loss: 0.7503 - acc: 0.7500
Epoch 2/10
4/4 [==============================] - 0s 817us/step - loss: 0.5142 - acc: 0.7500
Epoch 3/10
4/4 [==============================] - 0s 732us/step - loss: 0.4353 - acc: 0.7500
Epoch 4/10
4/4 [==============================] - 0s 694us/step - loss: 0.3413 - acc: 1.0000
Epoch 5/10
4/4 [==============================] - 0s 633us/step - loss: 0.2817 - acc: 1.0000
Epoch 6/10
4/4 [==============================] - 0s 679us/step - loss: 0.2299 - acc: 1.0000
Epoch 7/10
4/4 [==============================] - 0s 672us/step - loss: 0.1769 - acc: 1.0000
Epoch 8/10
4/4 [==============================] - 0s 721us/step - loss: 0.1412 - acc: 1.0000
Epoch 9/10
4/4 [==============================] - 0s 694us/step - loss: 0.1193 - acc: 1.0000
Epoch 10/10
4/4 [==============================] - 0s 716us/step - loss: 0.1015 - acc: 1.0000


...so yes, you can

Also note you calculated marginal probabilities, here you want them conditioned on the input variables to actually solve for the parameters