Terahertz (THz) optics often encounters the problem of small f number values (elements have relatively small diameters comparing to focal lengths). The need to redirect the THz beam out of the optical axis or form particular intensity distributions resulted in the application of iterative holographic methods to design THz diffractive elements. Elements working on-axis do not encounter significant improvement while using iterative holographic methods, however, for more complicated distributions the difference becomes meaningful. Here, we propose a totally different approach to design THz holograms, utilizing a neural network based algorithm, suitable also for complicated distributions. Full Text: PDF ReferencesY. Tao, A. Fitzgerald and V. Wallace, "Non-Contact, Non-Destructive Testing in Various Industrial Sectors with Terahertz Technology", Sensors, 20(3), 712 (2020). CrossRef J. O'Hara, S. Ekin, W. Choi and I. Song, "A Perspective on Terahertz Next-Generation Wireless Communications", Technologies, 7(2), 43 (2019). CrossRef L. Yu et al., "The medical application of terahertz technology in non-invasive detection of cells and tissues: opportunities and challenges", RSC Advances, 9(17), 9354 (2019). CrossRef A. Siemion, "The Magic of Optics—An Overview of Recent Advanced Terahertz Diffractive Optical Elements", Sensors, 21(1), 100 (2020). CrossRef A. Siemion, "Terahertz Diffractive Optics—Smart Control over Radiation", J. Infrared Millim. Terahertz Waves, 40(5), 477 (2019). CrossRef M. Surma, I. Ducin, P. Zagrajek and A. Siemion, "Sub-Terahertz Computer Generated Hologram with Two Image Planes", Appl. Sci., 9(4), 659 (2019). CrossRef S. Banerji and B.Sensale-Rodriguez, "A Computational Design Framework for Efficient, Fabrication Error-Tolerant, Planar THz Diffractive Optical Elements", Sci. Rep., 9(1), 5801 (2019). CrossRef J. Sun and F. Hu, "Three-dimensional printing technologies for terahertz applications: A review", Int. J. RF. Microw. C. E., 30(1) (2020). CrossRef E. Castro-Camus, M. Koch and A. I. Hernandez-Serrano, "Additive manufacture of photonic components for the terahertz band", J. Appl. Phys., 127(21), 210901 (2020). CrossRef https://community.wolfram.com/groups/-/m/t/2028026?p_%20479%20p_auth=blBtLb5d DirectLink P. Komorowski, et al., "Three-focal-spot terahertz diffractive optical element-iterative design and neural network approach", Opt. Express, 29(7), 11243-11253 (2021) CrossRef M. Sypek, "Light propagation in the Fresnel region. New numerical approach", Opt. Commun., 116(1-3), 43 (1995). CrossRef