Section 52. A town may establish and maintain, upon shore or upon vessels at the election of the school committee, one or more schools for training young persons in nautical duties. School committees may excuse persons attending such schools from attendance at other schools.