**5. Conclusions**

In this paper, we propose a multi-task network for both impedance inversion and seismic data reconstruction, and use a loss function based on the homoscedastic uncertainty of a Bayesian model to determine the optimal weight of the two tasks in the loss function. Test results from the Marmousi2, Overthrust, and Volve models show that: (1) the multitask model has better generalization performance than the single-task model when the amount of labeled data is the same; and (2) the method proposed in this paper can be used

to automatically determine the optimal weight of two tasks, and generates more accurate impedance than the single-task model. The proposed method can be extended to other multi-task learning approaches in a similar fashion.

In the future, we may apply the proposed method to high-dimensional seismic inversion, pre-stack inversion, and additional kinds of neural networks to verify its application value.

**Author Contributions:** Conceptualization, X.Z. (Xiu Zheng) and B.W.; Data curation, X.Z. (Xiu Zheng); Formal analysis, X.Z. (Xiu Zheng) and B.W.; Funding acquisition, X.Z. (Xiaosan Zhu); Investigation, X.Z. (Xiu Zheng); Methodology, X.Z. (Xiu Zheng) and B.W.; Supervision, B.W., X.Z. (Xiaosan Zhu) and X.Z. (Xu Zhu); Visualization, B.W.; Writing—original draft, X.Z. (Xiu Zheng). All authors have read and agreed to the published version of the manuscript.

**Funding:** This work was supported by the National Natural Science Foundation of China under Grant 41974122.

**Institutional Review Board Statement:** Not applicable.

**Informed Consent Statement:** Not applicable.

**Data Availability Statement:** The Volve field data is obtained from https://github.com/vishaldas/ CNN\_based\_impedance\_inversion/tree/master/Volve\_field\_example (accessed on 30 December 2020).

**Acknowledgments:** We thank two anonymous reviewers for their constructive comments on this paper. We also would like to thank Vishal Das et al., for the open-source code and prediction results of Volve field data, and thank Delin Meng, Jiaxu Yu and Zhenhui Jin for their programming help.

**Conflicts of Interest:** The authors declare no conflict of interest.
