Sriharsha-hatwar:

detach() is used to remove the hook when the forward_hook() is done for an intermediate layer?


No, detach() is not used for hooks, but is a tensor operation, which detaches the tensor from the computation graph. I.e. Autograd will stop during the backpropagation at this detached point.



 Sriharsha-hatwar:

Secondly, clone() is used to just clone the entire model as is.


No, clone() is also a tensor operation and will create a new tensor with the same data. The returned tensor will not be changed by inplace operations.
# without clone
x = torch.zeros(10)
y = x
x[0] = 1.
print(x)
> tensor([1., 0., 0., 0., 0., 0., 0., 0., 0., 0.])
print(y)
> tensor([1., 0., 0., 0., 0., 0., 0., 0., 0., 0.])

# with clone
x = torch.zeros(10)
y = x.clone()
x[0] = 1.
print(x)
> > tensor([1., 0., 0., 0., 0., 0., 0., 0., 0., 0.])
print(y)
> tensor([0., 0., 0., 0., 0., 0., 0., 0., 0., 0.])