we use electric fences all over our farm for keeping animals where they are supposed to be.
It doesn't usually take them long to figure out to avoid the wires (unflagged wires).
Before long they are reaching under them to get extra grass without touching them - so they get over their fear pretty quick.
The dogs also learn pretty quick which fences they can squeeze through and which fences are best to wait for the gate!
I am sure if you display confidence in your yard then your dog will follow suite.