Not a lawyer, but the AI training part doesn't seem relevant to this question. You can already take photos of restaurants and electronics, and after doing so you can use the photos because you took them and you're therefore the copyright holder. (Unless the restaurant made you sign something promising not to use photographs you take as a condition of entry, which has started to happen now with some museums and galleries, but not restaurants.)