Accurate extraction of retinal vessels is one important factor to computer-aided diagnosis for ophthalmologic diseases. Due to the low sensitivity and insufficient segmentation of tiny blood vessels within the existing segmentation algorithms, a novel retinal vessel segmentation algorithm is proposed, and its basis is on conditional generative adversarial nets, using W-net as generator. More specifically, firstly, the U-net is expanded to W-net through the skip connection, as the U-net is beneficial to the microvascular information transmission in the skip connection layer, then the network convergence is accelerated and the parameter utilization is improved. Secondly, the standard convolutions are replaced by the depth-wise separable convolutions, thus expanding the network and reducing the number of the parameters. Thirdly, the residual blocks are employed to mitigate the gradient disappearance and the explosion. Fourthly, during the proposed algorithm, each skip connection follows Squeeze-and-Excitation blocks so that the shallow features and deep features can be effectively fused through learning the interdependence of feature channel. Generally, the loss function of the conditional generative adversarial nets is modified to make the overall segmentation performance be optimal, while having strong global penalty ability in the whole game learning model. Finally, one experiment is carried out on the DRIVE dataset with image enhancement and data expansion. From the experiment results, the segmentation sensitivity reaches 87.18%, further the specificity, accuracy and AUC are 98.19%, 96.95% and 98.42% respectively, which show the overall performance and sensitivity are better than the existing algorithms.