Skip to content

Commit 345848a

Browse files
committed
Add correct folder
1 parent 2804b91 commit 345848a

File tree

1 file changed

+2
-3
lines changed
  • tutorials/03-advanced/image_captioning

1 file changed

+2
-3
lines changed

tutorials/03-advanced/image_captioning/train.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# Device configuration
1515
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
1616
now = datetime.datetime.now()
17-
dir = 'drive/My Drive/NLPResults/'
17+
dir = '/content/drive/My Drive/NLPResults/'
1818

1919
def append_progress(line):
2020
filename = "Progress" + str(now.day) +'-'+ str(now.hour) + str(now.minute) + str(now.second) + ".txt"
@@ -79,8 +79,7 @@ def main(args):
7979

8080
# Print log info
8181
if i % args.log_step == 0:
82-
log_info = 'Epoch [{}/{}], Step [{}/{}], Loss: {:.4f}, Perplexity: {:5.4f}'
83-
.format(epoch, args.num_epochs, i, total_step, loss.item(), np.exp(loss.item()))
82+
log_info = 'Epoch [{}/{}], Step [{}/{}], Loss: {:.4f}, Perplexity: {:5.4f}'.format(epoch, args.num_epochs, i, total_step, loss.item(), np.exp(loss.item()))
8483
append_progress(log_info)
8584
print()
8685

0 commit comments

Comments
 (0)