ProgrammerBoi
ProgrammerBoi

Reputation: 13

Neural Network in Python

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.

enter image description here

Do you have any tips for this?

Upvotes: -3

Views: 612

Answers (1)

Touten
Touten

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

Related Questions