Example of custom tensorflow or pytorch neural network

edit: since this question could be relevant for other people and it is a bit off topic I have created this discussion