物体検出で何のエラーかわからないです
解決したいこと
Pytorchで物体検出を作ってます。エラーが起きないのですが学習できていない状態で何が原因がわからない状態です。
発生している問題・エラー
/Users/nagaoyuuta/opt/anaconda3/lib/python3.9/site-packages/torch/nn/functional.py:780: UserWarning: Note that order of the arguments: ceil_mode and return_indices will changeto match the args list in nn.MaxPool2d in a future release.
warnings.warn("Note that order of the arguments: ceil_mode and return_indices will change"
epoch: 0 iteration: 0 loss: 66.70726178733568
該当するソースコード
model.train()
for epoch in range(num_epoch):
loss_hist.reset()
for i, (images, targets, ImageIDs) in enumerate(train_loader):
images = list(image.to(device) for image in images)
targets = [{k: v.to(device) for k, v in t.items()} for t in targets]
loss_dict = model(images, targets)
losses = sum(loss for loss in loss_dict.values())
loss_value = losses.item()
loss_hist.send(loss_value)
optimizer.zero_grad()
losses.backward()
optimizer.step()
if i%100 == 0: # 100回ごとに経過を表示
print("epoch:", epoch, "iteration:", i, "loss:", losses.item())
0 likes