A device for generating training data for a neural network, comprising:
- at least one optical waveguide having a plurality of fiber Bragg gratings,
- at least one light source configured to couple light into the optical waveguide,
- at least one spectrometer configured to determine spectrum data of the light reflected in the optical waveguide by measuring intensity versus wavelength of the reflected light,
- a robot arm configured to hold the optical waveguide and programmed to move the optical waveguide to thereby deform the optical waveguide,
- an apparatus configured to detect the shape of the deformed optical waveguide, and
- a memory configured to store data representing the shape of the optical waveguide and the spectrum data.