Can points not being passed to the loss function influence it? If I were to construct a model where only a subset of the training data is passed to the loss function, can the other parts of the dataset influence the fit?
More concretely, in this first example:
model.fit(x_train_subset, y_train_subset, val=[x_val, y_val])

Here, I am passing the model, and then the loss function, only the subset to be trained on.
In another example:
model.compile(loss=CustomLoss) #this loss will be based on x_train_subset
model.fit(x_train, y_train, val=[x_val, y_val])

Here, I have passed the entire training set to the fit, but using only a subset of them to find the loss.
My questions are:

Conceptually, are these the same?
If a point is not being passed to the loss function is it effectively invisible to the model training procedure?
1.Technically they are the same.They will compute the same loss. Although there will be a subtle difference in performance. In the first case gradient will only be calculated for the subset but in the second case gradient will be calculated for the whole training set but only the gradient of subset will be used to compute cost and update.
2.No, the points won't be invisible to the training procedure. the gradient will be calculated for all of the points but they won't be used.