I need to access access my X features and Y labels from a prefetch train dataset. I know that if I loop through the dataset I can have Xs and Ys printed. For instance:
for item in train_dataset:
print(item[0]) #access array with X
print(item[1]) #access array Y
but I actually need to separate X from Y to store them in separated numpy variables just like we do with X_train and Y_train when using sklearn train_test_split() function. As I they will serve as parameters for another function that does not accept prefetch datasets, but only numpy array of Xs and numpy array of Ys. Does anyone have an idea how this can be done?