The first thing to note is that you are calling the loss function wrong (CrossEntropyLoss — PyTorch 1.9.0 documentation) :

Its first argument, input, must be the output logit of your model, of shape (N, C), where C is the number of classes and N the batch size (in general)
The second argument, target, must be of shape (N), and its elements must be integers (in the mathematical sense) in the range [0, C-1].
A use case can be found in the documentation.

This being said, you should normally call your loss function as follows:
loss = loss_fn(pred_output, targets)

Second, when I look at your model :

it returns an output of shape (N, 1): what would be the point of using CrossEntropyLoss in this case, for C = 1? With the presence of 1 in target you will have an error like IndexError: Target 1 is out of bounds., because the element of target must go from 0 to C-1 = 0.
also, your target is of dimension (N, 1): this is incompatible as an argument to the loss function used here.
finally, your target is of type float32, it must be of type long.

Here is a code that works (if the output of your model is of dimension C, you can add numbers in [0, C-1] to targets)
# ...
targets = torch.tensor([
    [0],
    [0],
    [0],
    [0]
], dtype=torch.float32).to(device=device).squeeze().long() # squeeze() and long()
# ...
for epoch in range(epochs):
    pred_output = model(inputs) 
    loss = loss_fn(pred_output, targets) 
    print(loss)
# ...