somaticio / tensorflow.rb

tensorflow for ruby
BSD 3-Clause "New" or "Revised" License
827 stars 66 forks source link

refactor Session for readability #23

Closed geoffreylitt closed 8 years ago

geoffreylitt commented 8 years ago

As someone new to the project, I found Session#run quite difficult to follow.

This is an attempt at making it easier to understand for other developers, mainly by splitting it out into shorter methods with expressive names. This also now feels more typical of the Ruby style which tends to prefer short methods.

I confirmed that this doesn't break any unit tests. (thanks for writing those, very helpful for refactoring)

Some of these are subjective style things, so let me know what you think! Definitely open to feedback.

arafatkatze commented 8 years ago

@geoffreylitt Thanks a lot Geoffrey. This seems very nice!