Python Forum
f string concatenation problem
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
f string concatenation problem
#4
Actually your code shows that you don't understand f-strings. There is no need of concatenation.
print(f'epoch:{epoch}, acc: {accuracy: .3f}, loss: {loss: .3f}, lr: {optimizer.current_learning_rate}')
This is assuming you fix the problem with loss being None.
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply


Messages In This Thread
f string concatenation problem - by growSeb - Jun-28-2021, 04:19 AM
RE: f string concatenation problem - by bowlofred - Jun-28-2021, 04:30 AM
RE: f string concatenation problem - by growSeb - Jun-28-2021, 04:40 AM
RE: f string concatenation problem - by buran - Jun-28-2021, 05:00 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  FutureWarning: The behavior of DataFrame concatenation with empty or all-NA entries i sawtooth500 3 856 Mar-22-2024, 03:08 AM
Last Post: deanhystad
  Convert string to float problem vasik006 8 3,369 Jun-03-2022, 06:41 PM
Last Post: deanhystad
  String concatenation in SQL update statement hammer 3 1,498 Feb-24-2022, 08:00 PM
Last Post: hammer
Question Problem with string and \n Falassion 6 2,661 Jun-15-2021, 03:59 PM
Last Post: Falassion
  how to deal with problem of converting string to int usthbstar 1 1,962 Jan-05-2021, 01:33 PM
Last Post: perfringo
  Concatenation ?? ridgerunnersjw 1 1,706 Sep-26-2020, 07:29 PM
Last Post: deanhystad
  string problem Mathisdlg 6 2,831 Aug-05-2020, 09:31 AM
Last Post: Mathisdlg
  Unicode string index problem luoheng 6 3,003 Nov-23-2019, 03:04 PM
Last Post: luoheng
  simple string & input problem kungshamji 5 3,636 Jun-23-2019, 03:54 PM
Last Post: kungshamji
  Combining two strings together (not concatenation) DreamingInsanity 6 3,094 Mar-29-2019, 04:32 PM
Last Post: DreamingInsanity

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020