Thanks again, @ptrblck.
The current forms of Stress_Strain and KEL do not accept batches. However, I feel that they can be changed, so they accept. Please see KEL below:
def KEL(xcel,ycel,zcel,strain,stress):
    eta_v = torch.tensor([-1/(3)**(0.5),1/(3)**(0.5)])
    psi_v = torch.tensor([-1/(3)**(0.5),1/(3)**(0.5)])
    phi_v = torch.tensor([-1/(3)**(0.5),1/(3)**(0.5)])
    intpt = torch.tensor([[psi_v[0],eta_v[0],phi_v[0]],
                          [psi_v[1],eta_v[0],phi_v[0]],
                          [psi_v[1],eta_v[1],phi_v[0]],
                          [psi_v[0],eta_v[1],phi_v[0]],
                          [psi_v[0],eta_v[0],phi_v[1]],
                          [psi_v[1],eta_v[0],phi_v[1]],
                          [psi_v[1],eta_v[1],phi_v[1]],
                          [psi_v[0],eta_v[1],phi_v[1]]])
    w=1 
    Fint_e=torch.zeros((ndofe,1))
    Fext_e=torch.zeros((ndofe,1))
    for i in range(8):
        psi,eta,phi=intpt[i,:]
        Bmat, Jdet=shpG(psi,eta,phi,xcel,ycel,zcel)
        W=w*Jdet
        Fint_e[:,0] += W*torch.mm(torch.t(Bmat), stress[i,:].unsqueeze(1)).squeeze(1)
    return Fint_e, Fext_e

Stress_Strain function has a similar fashion.