DEV Community

Discussion on: Reinforcement Learning with TF2 and Gym (part I)

Collapse
 
otumianempire profile image
Michael Otu
if tf.__version__.startswith("1."):    
    print("Error!! You are using tensorflow-v1")
Enter fullscreen mode Exit fullscreen mode

At this point the code will still run. Does the version of tensorflow affect the functionality of the app?

Collapse
 
zqiu profile image
Z. QIU

yes, I check only if the version requirement has been satisfied. If you are using tensorflow 1.x, this program will report errors and halt. In this case, this message can give a hint for debugging.

Collapse
 
otumianempire profile image
Michael Otu

but this doesn't halt.. throw an error??

Thread Thread
 
zqiu profile image
Z. QIU

Agree, I have updated my code.