Your order of parentheses are wrong:
train_ds = train_ds.map(lambda x, y: (tf.image.resize(x, size)), y)
Should be:
train_ds = train_ds.map(lambda x, y: (tf.image.resize(x, size), y))