Hi Group, I'm new. So hopefully I'll figure out how to navigate this forum and get the help I need as I'm trying to learn python. Currently, I'm having a problem with what I believe is called f-string concatenation. I'm using pycharm to code python as I'm working my way through a book called Neural Networks from Scratch. The code I've typed out is long.... but the snippet I'm having a problem with is this:
TIA.
print(f'epoch:{epoch}, ' + f"acc: {accuracy: .3f}, ' + f'loss: {loss: .3f}, ' + f'lr: {optimizer.current_learning_rate}')The error is:
Error:Traceback (most recent call last):
File "C:\Users\........", line 465, in <module>
f'loss: {loss: .3f}, ' +
TypeError: unsupported format string passed to NoneType.__format__
I think that pycharm perhaps doesn't like the way it's set up. I don't know. Can someone explain what's gone wrong or how I can fix it?TIA.
buran write Jun-28-2021, 04:54 AM:
Please, use proper tags when post code, traceback, output, etc. This time I have added tags for you.
See BBcode help for more info.
Please, use proper tags when post code, traceback, output, etc. This time I have added tags for you.
See BBcode help for more info.