Mine did the same about 18 months ago. After a long fault finding session it turned out to be a fault with the ABS unit. It was bleeding internally and always lost pedal pressure after riding for a few metres.
Over $1000 later and all is fixed. Was only a few months out of warranty but Yamaha...