Reputation: 13
I have recently began attempting to create my own neural network without any NW module like Tensor Flow, but I could not get a already defined var into a function, so I put the data into a text file then read and write to it. Although it would not let me turn my weights back to an int to so I can multiply them by their learning rates. I get an error saying something like the int doesn't work with the base.
Do you have any tips for this?
Upvotes: -3
Views: 612
Reputation: 308
A couple things,
readlines()
returns a list so you probably want to index into it or use readline()
to get a single value.
If you value is the string '2.62' you want to either cast it to a float and work with a float or, if you realy want an int, cast it to a float then to an int or apply other logic to make it castable to a int as '2.62' is not directly castable to an int. Hope this helps.
Upvotes: 1