Thanks, for Answer
I try to make 3dCNN for Action recognition
(8, 3, 40, 128, 128) => (batch, channel, frame_len, height, width)
put in all at once Image * frame_len , and get one label (ex… fight,walk,stand…)
This is my code (train)
ave_loss =0
epoch_loss = 0
ave_loss =0
for epoch in range(nb_epoch):
print(“ㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡ”,epoch)
running_loss = 0.0
epoch_num = 1
for i, data in enumerate(train_loader, 0):
    model_ft.train()
  
    inputs, labels = data
    inputs = inputs.to(device)
    
    
    labels = torch.argmax(labels, dim=1)
    
    labels = labels.to(device)

  
    optimizer_ft.zero_grad()

    print("input shape : ",inputs.permute(0,4,1,2,3).shape)
    outputs = model_ft(inputs.permute(0,4,1,2,3))
    
    
    _, predicted = torch.max(outputs.data, 1)
   
 
    loss = criterion(outputs, labels)
    print(i)
    print('epoch: {}  Loss: {} %'.format(epoch, loss.data))
  
    loss.backward()
    optimizer_ft.step()

    
    running_loss += loss.item()
    epoch_loss = running_loss/(i+1)
 
 
    print("epoch_loss : ",epoch_loss)
    print("ACC : ",categorical_accuracy_with_logits(outputs,labels))


    value_tracker(loss_plt, torch.Tensor([epoch_loss]), torch.Tensor([i + epoch*len(train_loader) ]))
    epoch_num+=1


running_loss = 0.0
if epoch%5==0:
    acc = acc_check(model_ft, test_loader, epoch, save=1)
    value_tracker(acc_plt, torch.Tensor([acc]), torch.Tensor([epoch]))
    
if epoch%20==0:
    torch.save(model_ft, "D:/data/3dcnn_weights/basic128n_epoch_{}_acc_{}.pt".format(epoch, int(acc)))

print(‘Finished Training’)
I used the accuracy measurement method that I told you, but it always comes out as 1.
But the val accuracy is low.
thank you so much