Batch size to choose

I have a datasource with 5 parameters as input and 1 output, now the input is a 1005 matrix and out is 1001

How should I set my Net batchsize to train the data

I don’t really understand what you said, in pytorch you have to add an adicional dimension corresponding to batchsize, (typically dim 0).
you can use torch.unsqueeze to add this dimension to a tensor

I mean the batch for input is 5 and the batch for output is 1,
because my network is 5 input to get 1 output.

As far as I understand your use case, you have 5 input features and 1 output feature.
You also have 100 samples in your dataset.
As @JuanFMontesinos mentioned you might define the batch size as you want. E.g. if you set your batch size to 5, you would have input of [5, 5] and an output of [5, 1].