Is PyTorch better than TensorFlow for general use cases? originally appeared on Quora: the place to gain and share knowledge, empowering people to learn from others and better understand the world.
The mysterious looking detach () method removes the probability-results from what is called the PyTorch computational graph. Technically it's not necessary to detach, but doing so avoids a warning ...
Although it's possible to create a neural network using raw code, in most cases a better approach is to use a neural network code library. One of the most widely used neural code libraries is PyTorch.