somaticio / tensorflow.rb

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

'make install' does not create 'tf/Tensorflow.so' but instead create 'tf' #7

Closed nethsix closed 8 years ago

nethsix commented 8 years ago

When we do 'make install' step, the system will do something like: /usr/bin/install -c -m 0755 Tensorflow.so /usr/local/rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/x86_64-linux/tf

However if the tf/ does not exist thus instead of creating Tensorflow.so in tf/, it just creates Tensorflow.so

The easiest bypass for now is to create 'tf/' in the directory that the install will be prior to doing 'make install'.

Investigating better possibilities.

nethsix commented 8 years ago

@Arafatk One way to elegantly resolve the 'make install' issue is to restructure the 'ext/' directory, which I have done. I have also restructure the 'lib/' directory so that Graph, Session, Tensor, etc. are now all prefixed with Tensorflow::. Hopefully this keeps the global namespace clean; much like in Python tensorflow.Session is used instead of just Session, with this patch we can use Tensorflow::Session.

Any thoughts? Please let me know how to make it better.

nethsix commented 8 years ago

Closing because #9 merged.