Understanding detach() and unsqueezed() functions?

can anyone help me in understanding the use of following functions:

  1. detach()
  2. unsqueezed()

unsqueeze() : The model accepts inputs for prediction in the form of batches(remember while training we used to send in data as batches of 128) but now the input for prediction should also be sent in the form of batches…by using unsqueeze() we are adding another dimension to the input data (before : [1,28,28] after : [1,1,28,28]).
We are now sending in just a batch containing 1 input.

thanks a lot brother!