Generalized nets and machine learning