The contribution of the present work is the introduction of a time-reversal equivariant neural network (TENN) that can consider time-reversal-related physical quantities and the TENN-e3 model that can build a time-reversal E(3) equivariant model including spin for magnetic material which is built on time-reversal E(3)equivariant convolutions over spin and geometric tensors with high accuracy and generalization for cases including or not spin-orbit effect for both collinear and noncollinear magnetic moments. Based on TENN-e3, the spin potential and a general representation of the time-reversal E(3) equivariant spin-dependent electron Hamiltonian can be learned for describing the magnetic systems.