so the problem is that you have to introduce an extra batch dimension.
By choosing an appropriate batchsize (between 1 and 32 usually but can also be bigger) the inputs and outputs become of shape N,1 where N is the choosen batchsize.
E.g. for batchsize one you could do:
for e in range(epochs):
    for _x, _y in np.dstack(x_train, y_train):
    
        inps = Variable(torch.from_numpy(_x).to(torch.float())
        outs = Variable(torch.from_numpy(_y).to(torch.float())
    
        optm.zero_grad()
        outputs = model.forward(inps)
        loss = criterion(outputs, outs)
        loss.backward()
        optm.step()
    
        print('epoch {}, loss {}'.format(e,loss.data[0]))

and for batchsize 700 (not recommended):
for e in range(epochs):
    
    inps = Variable(x_in).view(-1, 1)
    outs = Variable(y_out).view(-1, 1)
    
    optm.zero_grad()
    outputs = model.forward(inps)
    loss = criterion(outputs, outs)
    loss.backward()
    optm.step()
    
    print('epoch {}, loss {}'.format(e,loss.data[0]))

The same concept also applies to different batch_sizes where you should split your array into batched chunks. Alternatively you could have a closer look on data loaders here 1 and and in this tutorial

Note: The Networks parameters are only updated once per batch. Choosing a suitable batchsize can be of enormous importance.