Structural optimization by gradient‐based neural networks