Thank you for your Answere,
the reaction of this line:
print((matrix1==matrix1).all())

was this line:
tensor(1, dtype=torch.uint8)

All my Datas are floats here the first 100 Numbers from my List “Datenset.txt”:
1.19532
1.194
1.19525
1.194
1620
1.19447
1.19387
1.19401
1.19417
1382
1.19461
1.19358
1.19415
1.19378
1508
1.19408
1.19377
1.19377
1.19391
1340
1.19466
1.19386
1.19392
1.19438
1318
1.19488
1.19362
1.19437
1.19417
2254
1.19478
1.19371
1.19417
1.19474
1748
1.19474
1.19414
1.19474
1.19422
1140
1.19454
1.19409
1.19421
1.1944
953
1.19491
1.19435
1.1944
1.19486
963
1.19549
1.19482
1.19486
1.19545
1164
1.19583
1.19458
1.19544
1.19521
2341
1.19687
1.19518
1.1952
1.19669
3691
1.19874
1.1967
1.19671
1.1981
3277
1.19848
1.19732
1.19813
1.19802
2924
1.19891
1.19788
1.19801
1.19869
1970
1.19949
1.19843
1.1987
1.19947
2850
1.19983
1.19822
1.19946
1.19866
2410
1.19947
1.19853
1.19865
1.19926
2262
1.20111
1.19875
1.19924
1.20095
4166

Ive try to write all your proposals in my code but the problem is the same:
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.autograd import Variable
import torch.optim as optim
import os

DatasetNumber = 1
DataAmount = 2
matrix1 = torch.zeros(DataAmount * 5)
matrix2 = torch.zeros(DataAmount * 5)

class TestNetz(nn.Module):

    # Netz erzeugen

    def __init__(self):

        super(TestNetz, self).__init__()
        self.lin1 = nn.Linear(DataAmount * 5, DataAmount * 5)  # Schichten (Hiddenlayer) (Funktionen die erlernt werden um vom Input auf Output zu kommen)
        F.log_softmax
        self.lin2 = nn.Linear(DataAmount * 5, DataAmount * 5)
        F.log_softmax

    def forward(self, x):
        x = F.relu(self.lin1(x), 0)  # Aktivierungsfunktion relu
        F.log_softmax
        x = self.lin2(x)
        F.log_softmax
        return x

    def num_flat_features(self, x):
        size = x.size()[1:]
        num = 1
        for i in size:
            num *= i
            return num

    # Daten vorbereiten

    k = open('Datenset.txt', 'r')
    lines = k.readlines()

    i = 0
    while i < DataAmount:
        j = 0
        while j < 5:
            matrix1[j + (5 * i)] = float(lines[j + (5 * i) + (DatasetNumber * 5)])
            matrix2[j + (5 * i)] = float(lines[(DatasetNumber * DataAmount) + (DataAmount * 5)])
            j = j + 1
        i = i + 1

    k.close()

    #print(matrix1)
    #print(matrix2)


netz = TestNetz()
netz = netz.cuda()
#print(netz)

if os.path.isfile('TestNetz.pt'):
    netz = torch.load('TestNetz.pt')


for i in range(100):
    # Input
    input = matrix1
    input = input.cuda()

    out = netz(input)

    #print(out)

    # Ziel
    target = matrix2
    target = target.cuda()





torch.save(netz, 'TestNetz.pt')

criterion = nn.MSELoss()  # Fehlerberechnung
loss = criterion(out, target)
# print(loss)

netz.zero_grad()
loss.backward()
optimizer = optim.SGD(netz.parameters(), lr=0.01)  # Optimizer (SGD) mit Lernrate
optimizer.step()

print((matrix1==matrix1).all())
print(matrix1)
print(matrix2)

edit: Ive checked all entries with print(type(entrie)) and all entries are “class float”.