Weighted Envelope Correlation-Based Waveform Inversion Using Automatic Differentiation