Neural nets training is probabilistic by nature because most of optimizers are and you shuffle your train_set, etc. Implementation may ( and surely) differ from MATLAB to PyTorch hence it is very unlikely you get same exact results, but comparable order of magnitude. Choosing hyper-parameters (batch_size, betas, lr etc.) mainly relies on experience. That said for some well-studied topics they are some recommendation (e.g Adam works well in NLP tasks, SGD works well on average etc.). You can also control dynamically the learning rate ( works well for some problems) or optimize some of your hyper-params using the package ray[tune]. Trial and error should be great to begin.