This repository contains a Ruby API for utilizing TensorFlow.

Overview

tensorflow.rb

Description

This repository contains a Ruby API for utilizing TensorFlow.

Linux CPU Linux GPU PIP Mac OS CPU
Build Status Not Configured Not Configured

Code Climate Join the chat at https://gitter.im/tensorflowrb/Lobby Inline docs

Documentation

Everything is at RubyDoc. You can also generate docs by bundle exec rake doc.

Blog Posts

  1. Introductory blog post
  2. Developers blog post
  3. Image Recognition Tutorial

Installation

Install Script

I have made a make shift install script in tools directory. You are free to use it, but it still needs some work and there is a chance that you might face some issues with it and if you do face some issues, you can use the instructions below. You are welcome to make improvements to the script.

Docker

It's easiest to get started using the prebuilt Docker container.

Launch:

docker run --rm -it nethsix/ruby-tensorflow-ubuntu:0.0.1 /bin/bash

Test:

cd /repos/tensorflow.rb/
bundle exec rspec

Image Classification Tutorial:

cd /repos/tensorflow.rb/image/
cat README

For more details about all the fun machine-learning stuff already pre-installed, see: https://hub.docker.com/r/nethsix/ruby-tensorflow-ubuntu/

Outside of Docker

Alternatively, you can install outside of a Docker container by following the following steps.

Explicit dependencies

Implicit dependencies (No Action Required)

Installation

All the dependencies mentioned above must be installed in your system before you proceed further.

Clone and Install TensorFlow

This package depends on the TensorFlow shared libraries, in order to compile these libraries do the following:

git clone --recurse-submodules https://github.com/tensorflow/tensorflow
cd tensorflow
./configure

This command clones the repository and a few sub modules. After this you should do:

bazel build -c opt //tensorflow:libtensorflow.so

This command takes in the order of 10-15 minutes to run and creates a shared library. When finished, copy the newly generated libtensorflow.so shared library:

# Linux
sudo cp bazel-bin/tensorflow/libtensorflow.so /usr/lib/
sudo cp bazel-bin/tensorflow/libtensorflow_framework.so /usr/lib   

# OSX
sudo cp bazel-bin/tensorflow/libtensorflow.so /usr/local/lib
sudo cp bazel-bin/tensorflow/libtensorflow_framework.so /usr/lib
export LIBRARY_PATH=$PATH:/usr/local/lib (may be required)

Install tensorflow.rb

Clone and install this Ruby API:

git clone https://github.com/somaticio/tensorflow.rb.git
cd tensorflow.rb/ext/sciruby/tensorflow_c
ruby extconf.rb
make
make install # Creates ../lib/ruby/site_ruby/X.X.X/
   
    /sciruby/Tensorflow.{bundle, so}
cd ./../../..
bundle install
bundle exec rake install

   

The last command is for installing the gem.

Run tests and verify install

bundle exec rake spec

This command is to run the tests.

Tensorboard

You can run tensorboard on tensorflow.rb too. Just take a look at tensorboard.md file.

License

Copyright (c) 2016, Arafat Dad Khan. somatic

All rights reserved.

Acknowledgements

Comments
  • Spec fails unpredictably

    Spec fails unpredictably

    For some reason the string data spec fails. When I run it for the first time I get these results:

    /Users/sebastiandeutsch/.rbenv/versions/2.3.1/bin/ruby -I/Users/sebastiandeutsch/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rspec-core-3.4.2/lib:/Users/sebastiandeutsch/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rspec-support-3.4.1/lib /Users/sebastiandeutsch/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rspec-core-3.4.2/exe/rspec --pattern spec/\*\*\{,/\*/\*\*\}/\*_spec.rb
    ............................................F
    
    Failures:
    
      1) Tensorflow::Tensor Should make tensor of string data type.
         Failure/Error: expect(["Ruby", "Tensorflow", "is", "cool"]).to match_array(Tensorflow::string_reader(input1.tensor))
    
           expected collection contained:  ["", "Ruby", "Tensorf\xD8F7", "\xD6\x94\xAE\x99\x7F\x00\x00\xC0%\x84\xAF\x99\x7F\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03\x00\x06<\xF8\x9A\xF9\a\x00\xF0\xBE\x0F\xF8\x9A\xF9\a\x000\x00\x00\x00\x00\x00\x00\x000\x00\x00\x00\x00\x00\x00\x000\x1D\x00\x8F\xAF\x99\x7F\x00\x00\x00"]
           actual collection contained:    ["Ruby", "Tensorflow", "cool", "is"]
           the missing elements were:      ["", "Tensorf\xD8F7", "\xD6\x94\xAE\x99\x7F\x00\x00\xC0%\x84\xAF\x99\x7F\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03\x00\x06<\xF8\x9A\xF9\a\x00\xF0\xBE\x0F\xF8\x9A\xF9\a\x000\x00\x00\x00\x00\x00\x00\x000\x00\x00\x00\x00\x00\x00\x000\x1D\x00\x8F\xAF\x99\x7F\x00\x00\x00"]
           the extra elements were:        ["Tensorflow", "cool", "is"]
         # ./spec/tensor_spec.rb:19:in `block (2 levels) in <top (required)>'
    
    Finished in 0.42225 seconds (files took 0.32834 seconds to load)
    45 examples, 1 failure
    
    Failed examples:
    
    rspec ./spec/tensor_spec.rb:17 # Tensorflow::Tensor Should make tensor of string data type.
    
    /Users/sebastiandeutsch/.rbenv/versions/2.3.1/bin/ruby -I/Users/sebastiandeutsch/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rspec-core-3.4.2/lib:/Users/sebastiandeutsch/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rspec-support-3.4.1/lib /Users/sebastiandeutsch/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rspec-core-3.4.2/exe/rspec --pattern spec/\*\*\{,/\*/\*\*\}/\*_spec.rb failed
    

    When I run it again I get this error:

    /Users/sebastiandeutsch/.rbenv/versions/2.3.1/bin/ruby -I/Users/sebastiandeutsch/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rspec-core-3.4.2/lib:/Users/sebastiandeutsch/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rspec-support-3.4.1/lib /Users/sebastiandeutsch/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rspec-core-3.4.2/exe/rspec --pattern spec/\*\*\{,/\*/\*\*\}/\*_spec.rb
    ............................................ruby(7394,0x7fff774d5000) malloc: *** mach_vm_map(size=140481453690880) failed (error code=3)
    *** error: can't allocate region
    *** set a breakpoint in malloc_error_break to debug
    libc++abi.dylib: terminating with uncaught exception of type std::bad_alloc: std::bad_alloc
    /Users/sebastiandeutsch/.rbenv/versions/2.3.1/bin/ruby -I/Users/sebastiandeutsch/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rspec-core-3.4.2/lib:/Users/sebastiandeutsch/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rspec-support-3.4.1/lib /Users/sebastiandeutsch/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rspec-core-3.4.2/exe/rspec --pattern spec/\*\*\{,/\*/\*\*\}/\*_spec.rb failed
    rake aborted!
    TypeError: no implicit conversion from nil to integer
    /Users/sebastiandeutsch/.rbenv/versions/2.3.1/bin/bundle:23:in `load'
    /Users/sebastiandeutsch/.rbenv/versions/2.3.1/bin/bundle:23:in `<main>'
    Tasks: TOP => spec
    (See full trace by running task with --trace)
    

    I'm running OSX (El Capitain)

    ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin15] using rbenv
    tensorflow at d2c913aa9b7cb63e466392f76d46ac5fbc1e9825
    
    opened by sebastiandeutsch 24
  • arithmetic on a pointer to void

    arithmetic on a pointer to void

    When running make I get the following errors:

    ././files/tf_tensor_helper.cc:43:46: error: arithmetic on a pointer to void
                    *(char *)(buffer_data_pointer+i) = file_string[i];
    
    ././files/tf_tensor_helper.cc:52:56: error: arithmetic on a pointer to void
                    buffer += *(char *)(buffer_data_pointer+i);
    
    ././files/tf_tensor_helper.cc:264:39: error: arithmetic on a pointer to void
            auto dst_str = (char *)(cbytes+8);
    
    ././files/tf_tensor_helper.cc:274:36: error: arithmetic on a pointer to void
            auto src = (char *)(cbytes + 8);
    

    If I typecast these to char* before the addition I can get the gem to build, but it segfaults when I try to do anything. For instance, here is the backtrace when I try to run the classify_image.rb example:

    /Users/matthew-mongeau/.gem/ruby/2.4.0/gems/tensorflow-0.0.1/lib/tensorflow/tensor.rb:59: [BUG] Segmentation fault at 0x0000012ed5a000
    ruby 2.4.0p0 (2016-12-24 revision 57164) [x86_64-darwin15]
    
    -- Crash Report log information --------------------------------------------
       See Crash Report log file under the one of following:                    
         * ~/Library/Logs/CrashReporter                                         
         * /Library/Logs/CrashReporter                                          
         * ~/Library/Logs/DiagnosticReports                                     
         * /Library/Logs/DiagnosticReports                                      
       for more details.                                                        
    Don't forget to include the above Crash Report log file in bug reports.     
    
    -- Control frame information -----------------------------------------------
    c:0005 p:---- s:0044 e:000043 CFUNC  :TF_NewTensor_wrapper
    c:0004 p:0280 s:0035 e:000032 METHOD /Users/matthew-mongeau/.gem/ruby/2.4.0/gems/tensorflow-0.0.1/lib/tensorflow/tensor.rb:59 [FINISH]
    c:0003 p:---- s:0027 e:000026 CFUNC  :new
    c:0002 p:0629 s:0021 E:0010e8 EVAL   classify_image.rb:71 [FINISH]
    c:0001 p:0000 s:0003 E:000140 (none) [FINISH]
    
    -- Ruby level backtrace information ----------------------------------------
    classify_image.rb:71:in `<main>'
    classify_image.rb:71:in `new'
    /Users/matthew-mongeau/.gem/ruby/2.4.0/gems/tensorflow-0.0.1/lib/tensorflow/tensor.rb:59:in `initialize'
    /Users/matthew-mongeau/.gem/ruby/2.4.0/gems/tensorflow-0.0.1/lib/tensorflow/tensor.rb:59:in `TF_NewTensor_wrapper'
    
    -- Machine register context ------------------------------------------------
     rax: 0x000000011743f000 rbx: 0x0000000000126000 rcx: 0x000000000008f000
     rdx: 0x0000000000126000 rdi: 0x00000001174d6000 rsi: 0x000000012ed5a000
     rbp: 0x00007fff4fee2830 rsp: 0x00007fff4fee2830  r8: 0x0000000003000001
      r9: 0x0000000000000003 r10: 0x0000000000000000 r11: 0xffffffffe877c000
     r12: 0x00000001102de120 r13: 0x0000000000000004 r14: 0x000000012ecc3000
     r15: 0x000000011743f000 rip: 0x00007fff91a37f49 rfl: 0x0000000000010206
    
    -- C level backtrace information -------------------------------------------
    0   ruby                                0x000000010fee72f4 rb_vm_bugreport + 388
    1   ruby                                0x000000010fd8166a rb_bug_context + 490
    2   ruby                                0x000000010fe62e9f sigsegv + 175
    3   libsystem_platform.dylib            0x00007fff91a3552a _sigtramp + 26
    4   libsystem_platform.dylib            0x00007fff91a37f49 _platform_memmove$VARIANT$Haswell + 41
    
    -- Other runtime information -----------------------------------------------
    
    * Loaded script: classify_image.rb
    
    * Loaded features:
    
        0 enumerator.so
        1 thread.rb
        2 rational.so
        3 complex.so
        4 /Users/matthew-mongeau/.rubies/ruby-2.4.0/lib/ruby/2.4.0/x86_64-darwin15/enc/encdb.bundle
        5 /Users/matthew-mongeau/.rubies/ruby-2.4.0/lib/ruby/2.4.0/x86_64-darwin15/enc/trans/transdb.bundle
        6 /Users/matthew-mongeau/.rubies/ruby-2.4.0/lib/ruby/2.4.0/unicode_normalize.rb
        7 /Users/matthew-mongeau/.rubies/ruby-2.4.0/lib/ruby/2.4.0/x86_64-darwin15/rbconfig.rb
        8 /Users/matthew-mongeau/.rubies/ruby-2.4.0/lib/ruby/2.4.0/rubygems/compatibility.rb
        9 /Users/matthew-mongeau/.rubies/ruby-2.4.0/lib/ruby/2.4.0/rubygems/defaults.rb
       10 /Users/matthew-mongeau/.rubies/ruby-2.4.0/lib/ruby/2.4.0/rubygems/deprecate.rb
       11 /Users/matthew-mongeau/.rubies/ruby-2.4.0/lib/ruby/2.4.0/rubygems/errors.rb
       12 /Users/matthew-mongeau/.rubies/ruby-2.4.0/lib/ruby/2.4.0/rubygems/version.rb
       13 /Users/matthew-mongeau/.rubies/ruby-2.4.0/lib/ruby/2.4.0/rubygems/requirement.rb
       14 /Users/matthew-mongeau/.rubies/ruby-2.4.0/lib/ruby/2.4.0/rubygems/platform.rb
       15 /Users/matthew-mongeau/.rubies/ruby-2.4.0/lib/ruby/2.4.0/rubygems/basic_specification.rb
       16 /Users/matthew-mongeau/.rubies/ruby-2.4.0/lib/ruby/2.4.0/rubygems/stub_specification.rb
       17 /Users/matthew-mongeau/.rubies/ruby-2.4.0/lib/ruby/2.4.0/rubygems/util/list.rb
       18 /Users/matthew-mongeau/.rubies/ruby-2.4.0/lib/ruby/2.4.0/x86_64-darwin15/stringio.bundle
       19 /Users/matthew-mongeau/.rubies/ruby-2.4.0/lib/ruby/2.4.0/rubygems/specification.rb
       20 /Users/matthew-mongeau/.rubies/ruby-2.4.0/lib/ruby/2.4.0/rubygems/exceptions.rb
       21 /Users/matthew-mongeau/.rubies/ruby-2.4.0/lib/ruby/2.4.0/rubygems/dependency.rb
       22 /Users/matthew-mongeau/.rubies/ruby-2.4.0/lib/ruby/2.4.0/rubygems/core_ext/kernel_gem.rb
       23 /Users/matthew-mongeau/.rubies/ruby-2.4.0/lib/ruby/2.4.0/monitor.rb
       24 /Users/matthew-mongeau/.rubies/ruby-2.4.0/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb
       25 /Users/matthew-mongeau/.rubies/ruby-2.4.0/lib/ruby/2.4.0/rubygems.rb
       26 /Users/matthew-mongeau/.rubies/ruby-2.4.0/lib/ruby/2.4.0/rubygems/path_support.rb
       27 /Users/matthew-mongeau/.rubies/ruby-2.4.0/lib/ruby/gems/2.4.0/gems/did_you_mean-1.1.0/lib/did_you_mean/version.rb
       28 /Users/matthew-mongeau/.rubies/ruby-2.4.0/lib/ruby/gems/2.4.0/gems/did_you_mean-1.1.0/lib/did_you_mean/core_ext/name_error.rb
       29 /Users/matthew-mongeau/.rubies/ruby-2.4.0/lib/ruby/gems/2.4.0/gems/did_you_mean-1.1.0/lib/did_you_mean/levenshtein.rb
       30 /Users/matthew-mongeau/.rubies/ruby-2.4.0/lib/ruby/gems/2.4.0/gems/did_you_mean-1.1.0/lib/did_you_mean/jaro_winkler.rb
       31 /Users/matthew-mongeau/.rubies/ruby-2.4.0/lib/ruby/gems/2.4.0/gems/did_you_mean-1.1.0/lib/did_you_mean/spell_checker.rb
       32 /Users/matthew-mongeau/.rubies/ruby-2.4.0/lib/ruby/2.4.0/delegate.rb
       33 /Users/matthew-mongeau/.rubies/ruby-2.4.0/lib/ruby/gems/2.4.0/gems/did_you_mean-1.1.0/lib/did_you_mean/spell_checkers/name_error_checkers/class_name_checker.rb
       34 /Users/matthew-mongeau/.rubies/ruby-2.4.0/lib/ruby/gems/2.4.0/gems/did_you_mean-1.1.0/lib/did_you_mean/spell_checkers/name_error_checkers/variable_name_checker.rb
       35 /Users/matthew-mongeau/.rubies/ruby-2.4.0/lib/ruby/gems/2.4.0/gems/did_you_mean-1.1.0/lib/did_you_mean/spell_checkers/name_error_checkers.rb
       36 /Users/matthew-mongeau/.rubies/ruby-2.4.0/lib/ruby/gems/2.4.0/gems/did_you_mean-1.1.0/lib/did_you_mean/spell_checkers/method_name_checker.rb
       37 /Users/matthew-mongeau/.rubies/ruby-2.4.0/lib/ruby/gems/2.4.0/gems/did_you_mean-1.1.0/lib/did_you_mean/spell_checkers/null_checker.rb
       38 /Users/matthew-mongeau/.rubies/ruby-2.4.0/lib/ruby/gems/2.4.0/gems/did_you_mean-1.1.0/lib/did_you_mean/formatter.rb
       39 /Users/matthew-mongeau/.rubies/ruby-2.4.0/lib/ruby/gems/2.4.0/gems/did_you_mean-1.1.0/lib/did_you_mean.rb
       40 /Users/matthew-mongeau/.gem/ruby/2.4.0/gems/tensorflow-0.0.1/lib/sciruby/Tensorflow.bundle
       41 /Users/matthew-mongeau/.gem/ruby/2.4.0/gems/tensorflow-0.0.1/lib/tensorflow/opspec.rb
       42 /Users/matthew-mongeau/.gem/ruby/2.4.0/gems/tensorflow-0.0.1/lib/tensorflow/tensor.rb
       43 /Users/matthew-mongeau/.gem/ruby/2.4.0/gems/tensorflow-0.0.1/lib/tensorflow/graph.rb
       44 /Users/matthew-mongeau/.gem/ruby/2.4.0/gems/tensorflow-0.0.1/lib/tensorflow/session.rb
       45 /Users/matthew-mongeau/.gem/ruby/2.4.0/gems/tensorflow-0.0.1/lib/tensorflow/session_options.rb
       46 /Users/matthew-mongeau/.gem/ruby/2.4.0/gems/tensorflow-0.0.1/lib/tensorflow/status.rb
       47 /Users/matthew-mongeau/.gem/ruby/2.4.0/gems/tensorflow-0.0.1/lib/tensorflow/operation.rb
       48 /Users/matthew-mongeau/.gem/ruby/2.4.0/gems/tensorflow-0.0.1/lib/tensorflow/savedmodel.rb
       49 /Users/matthew-mongeau/.gem/ruby/2.4.0/gems/tensorflow-0.0.1/lib/tensorflow/scope.rb
       50 /Users/matthew-mongeau/.gem/ruby/2.4.0/gems/tensorflow-0.0.1/lib/tensorflow/op.rb
       51 /Users/matthew-mongeau/.gem/ruby/2.4.0/gems/tensorflow-0.0.1/lib/tensorflow.rb
    
    opened by halogenandtoast 13
  • 'bundle install' for nmatrix fails on MacOS unless user has special compiler flags

    'bundle install' for nmatrix fails on MacOS unless user has special compiler flags

    @chrhansen , @Arafatk

    'bundle install' now breaks (see message below) since nmatrix requires gcc that supports special flags. If we want this gem to be used widely, it may be good to keep additional installation steps to a minimum? Is nmatrix required for accuracy in rspec testing or for performance reason? Would it make sense for someone to have the option to install the gem with nmatrix turned off unless required?

    Thanks for your help.

    Installing nmatrix 0.2.1 with native extensions                        [27/1864]
    
    Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
    
        /Users/nethsix/.rvm/rubies/ruby-2.2.4/bin/ruby -r ./siteconf20160711-52226-1
    5l5d7y.rb extconf.rb
    checking for apparent GNU g++ binary with C++0x/C++11 support... Exception `Runt
    imeError' at extconf.rb:141 - You need a version of g++ which supports -std=c++0
    x or -std=c++11. If you're on a Mac and using Homebrew, we recommend using mac-b
    rew-gcc.sh to install a more recent g++.
    *** extconf.rb failed ***
    Could not create Makefile due to some reason, probably lack of necessary
    libraries and/or headers.  Check the mkmf.log file for more details.  You may
    need configuration options.
    
    Provided configuration options:
            --with-opt-dir
            --with-opt-include
            --without-opt-include=${opt-dir}/include
            --with-opt-lib
            --without-opt-lib=${opt-dir}/lib
            --with-make-prog
            --without-make-prog
            --srcdir=.                                                      [4/1864]
            --curdir
            --ruby=/Users/nethsix/.rvm/rubies/ruby-2.2.4/bin/$(RUBY_BASE_NAME)
    extconf.rb:141:in `<main>': You need a version of g++ which supports -std=c++0x 
    or -std=c++11. If you're on a Mac and using Homebrew, we recommend using mac-bre
    w-gcc.sh to install a more recent g++. (RuntimeError)
    
    extconf failed, exit code 1
    
    Gem files will remain installed in /Users/nethsix/.rvm/gems/ruby-2.2.4@ruby-tens
    orflow-nethsix/gems/nmatrix-0.2.1 for inspection.
    Results logged to /Users/nethsix/.rvm/gems/ruby-2.2.4@ruby-tensorflow-nethsix/ex
    tensions/x86_64-darwin-15/2.2.0/nmatrix-0.2.1/gem_make.out
    An error occurred while installing nmatrix (0.2.1), and Bundler cannot continue.
    Make sure that `gem install nmatrix -v '0.2.1'` succeeds before bundling.
    
    opened by nethsix 13
  • Circle ci use prebuilt docker image

    Circle ci use prebuilt docker image

    • DON'T MERGE YET, instead:
      1. Please sign up for CircleCI (click 'Add' button on the top-right) when you have time here: https://github.com/integrations/circle-ci
      2. At the dashboard, select yourself
      3. Select ruby-tensorflow
      4. Look for this branch, and click on it
      5. Click 'rebuild' at the top
      6. Let us know in the comments if it was successful
    • Notes:
      • Changed circle.yml to instruct CircleCI to use prebuilt docker image for building ruby-tensorflow and running specs
      • It now takes < 4 mins instead of ~45 mins to build and run specs
      • Auto-CI is still turned off since we're testing the flow
    opened by nethsix 10
  • example.rb giving  undefined method `length' error

    example.rb giving undefined method `length' error

    I have asked the following question on stackoverflow but have had no answer:

    I have installed tensorflow.rb using docker, as described. When I run bundle exec rspec spec, all examples pass.

    I have created a file example.rb as instructed. When I run the file using ruby example.rb, I get the following error

    /usr/local/rvm/gems/ruby-2.2.4@ruby-tensorflow/gems/tensorflow-0.0.1/lib/tensorflow/session.rb:168:in `graph_def_to_c_array': undefined method `length' for nil:NilClass (NoMethodError)
        from /usr/local/rvm/gems/ruby-2.2.4@ruby-tensorflow/gems/tensorflow-0.0.1/lib/tensorflow/session.rb:51:in `extend_graph'
        from example.rb:9:in `<main>'
    

    When I run each line of example.rb in an irb session, the error occurs at the command:

    session.extend_graph(graph)
    

    How do I fix this?

    opened by obromios 9
  • Configure build on travis-ci

    Configure build on travis-ci

    It's for my branch https://travis-ci.org/chrhansen/tensorflow.rb, will enable for this repository once the build works. I think that a couple fresh eyes on the .travis.yml file and the build errors https://travis-ci.org/chrhansen/tensorflow.rb we should be able to get this working quickly.

    Good sources of info:

    help wanted 
    opened by chrhansen 9
  • Wider Ruby support using FFI

    Wider Ruby support using FFI

    I started playing with TensorFlow a bit today, and of course my first thought was doing it in Ruby.

    Because I wanted something that would work with JRuby, my first path was to generate an FFI library. After some struggling with ffi_gen, I managed to generate this...and it worked!

    https://gist.github.com/headius/446fc4980bf715bc5b358f1ba881aa80

    I worked through some of the basic examples and, as you might expect, I saw an obvious need for better Ruby abstractions around the C API.

    So I found tensorflow.rb!

    Unfortunately tensorflow.rb uses a C extension. So I ask: why not replace that extension with the FFI code above?

    opened by headius 7
  • Image Recognition example not working any more

    Image Recognition example not working any more

    When I try the image recognition example with newest libtensorflow.so, I got a error below. BTW, new libtensorflow.so is quite small than previous version like 90MB vs 450MB

    `2017-04-06 11:18:59.850190: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations. 2017-04-06 11:18:59.850225: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations. 2017-04-06 11:18:59.850231: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations. 2017-04-06 11:18:59.850235: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX2 instructions, but these are available on your machine and could speed up CPU computations. 2017-04-06 11:18:59.850238: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use FMA instructions, but these are available on your machine and could speed up CPU computations. Trying to classify image file: ./mysore_palace.jpg 2017-04-06 11:19:00.429785: W tensorflow/core/framework/op_def_util.cc:332] Op BatchNormWithGlobalNormalization is deprecated. It will cease to work in GraphDef version 9. Use tf.nn.batch_normalization(). No Operation with the name input exists. No Operation with the name output exists. /var/lib/gems/2.3.0/gems/tensorflow-0.0.1/lib/tensorflow/session.rb:54: [BUG] Segmentation fault at 0x00000000000030 ruby 2.3.1p112 (2016-04-26) [x86_64-linux-gnu]

    -- Control frame information ----------------------------------------------- c:0004 p:---- s:0039 e:000038 CFUNC :Session_run c:0003 p:0117 s:0031 e:000030 METHOD /var/lib/gems/2.3.0/gems/tensorflow-0.0.1/lib/tensorflow/session.rb:54 c:0002 p:0700 s:0019 E:0012d8 EVAL classify_image.rb:79 [FINISH] c:0001 p:0000 s:0002 E:001fd0 (none) [FINISH]

    -- Ruby level backtrace information ---------------------------------------- classify_image.rb:79:in <main>' /var/lib/gems/2.3.0/gems/tensorflow-0.0.1/lib/tensorflow/session.rb:54:inrun' /var/lib/gems/2.3.0/gems/tensorflow-0.0.1/lib/tensorflow/session.rb:54:in `Session_run'

    -- Machine register context ------------------------------------------------ RIP: 0x00007f57faa951cd RBP: 0x00007ffc9c39a090 RSP: 0x00007ffc9c399fd0 RAX: 0x0000000000000000 RBX: 0x00007ffc9c39a040 RCX: 0x00007ffc9c39a030 RDX: 0x0000000000000000 RDI: 0x00007ffc9c39a160 RSI: 0x00007ffc9c399fd0 R8: 0x00007ffc9c39a041 R9: 0x00000000cccccccd R10: 0x00007f57fe9c3bb8 R11: 0x00007f57fe9c3b78 R12: 0x00007ffc9c39a160 R13: 0x00007ffc9c39a030 R14: 0x0000000001d6d9a0 R15: 0x0000000000000040 EFL: 0x0000000000010202

    -- C level backtrace information ------------------------------------------- /usr/lib/x86_64-linux-gnu/libruby-2.3.so.2.3 [0x7f57feb53ca5] /usr/lib/x86_64-linux-gnu/libruby-2.3.so.2.3 [0x7f57feb53edc] /usr/lib/x86_64-linux-gnu/libruby-2.3.so.2.3 [0x7f57fea2d944] /usr/lib/x86_64-linux-gnu/libruby-2.3.so.2.3 [0x7f57feadfc3e] /lib/x86_64-linux-gnu/libc.so.6 [0x7f57fe6354b0] /usr/lib/libtensorflow.so(_ZN12_GLOBAL__N_110OutputNameERK9TF_Output.isra.36+0x6d) [0x7f57faa951cd] /usr/lib/libtensorflow.so(TF_SessionRun+0x1bf) [0x7f57faaa24af] /var/lib/gems/2.3.0/gems/tensorflow-0.0.1/lib/sciruby/Tensorflow.so(_ZN10tensorflow11Session_runEP10TF_SessionSt6vectorI9TF_OutputSaIS3_EES2_IP9TF_TensorSaIS7_EES5_S2_IP12TF_OperationSaISB_EE+0x223) [0x7f57fcf34ed3] ./files/tf_tensor_helper.cc:202 /var/lib/gems/2.3.0/gems/tensorflow-0.0.1/lib/sciruby/Tensorflow.so(_ZL17_wrap_Session_runiPmm+0x514) [0x7f57fcf47ed4] Tensorflow_wrap.cxx:27336 /usr/lib/x86_64-linux-gnu/libruby-2.3.so.2.3 [0x7f57feb4150b] /usr/lib/x86_64-linux-gnu/libruby-2.3.so.2.3 [0x7f57feb45269] /usr/lib/x86_64-linux-gnu/libruby-2.3.so.2.3 [0x7f57feb4a142] /usr/lib/x86_64-linux-gnu/libruby-2.3.so.2.3 [0x7f57fea30cfd] /usr/lib/x86_64-linux-gnu/libruby-2.3.so.2.3(ruby_exec_node+0x1d) [0x7f57fea326fd] /usr/lib/x86_64-linux-gnu/libruby-2.3.so.2.3(ruby_run_node+0x1e) [0x7f57fea3483e] ruby [0x40087b] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0) [0x7f57fe620830] ruby(_start+0x29) [0x4008a9]

    -- Other runtime information -----------------------------------------------

    • Loaded script: classify_image.rb

    • Loaded features:

      0 enumerator.so 1 thread.rb 2 rational.so 3 complex.so 4 /usr/lib/x86_64-linux-gnu/ruby/2.3.0/enc/encdb.so 5 /usr/lib/x86_64-linux-gnu/ruby/2.3.0/enc/trans/transdb.so 6 /usr/lib/ruby/2.3.0/unicode_normalize.rb 7 /usr/lib/x86_64-linux-gnu/ruby/2.3.0/rbconfig.rb 8 /usr/lib/ruby/2.3.0/rubygems/compatibility.rb 9 /usr/lib/ruby/2.3.0/rubygems/defaults.rb 10 /usr/lib/ruby/2.3.0/rubygems/deprecate.rb 11 /usr/lib/ruby/2.3.0/rubygems/errors.rb 12 /usr/lib/ruby/2.3.0/rubygems/version.rb 13 /usr/lib/ruby/2.3.0/rubygems/requirement.rb 14 /usr/lib/ruby/2.3.0/rubygems/platform.rb 15 /usr/lib/ruby/2.3.0/rubygems/basic_specification.rb 16 /usr/lib/ruby/2.3.0/rubygems/stub_specification.rb 17 /usr/lib/ruby/2.3.0/rubygems/util/list.rb 18 /usr/lib/x86_64-linux-gnu/ruby/2.3.0/stringio.so 19 /usr/lib/ruby/2.3.0/rubygems/specification.rb 20 /usr/lib/ruby/2.3.0/rubygems/exceptions.rb 21 /usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb 22 /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_gem.rb 23 /usr/lib/ruby/2.3.0/monitor.rb 24 /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb 25 /usr/lib/ruby/2.3.0/rubygems.rb 26 /usr/lib/ruby/vendor_ruby/did_you_mean/version.rb 27 /usr/lib/ruby/vendor_ruby/did_you_mean/core_ext/name_error.rb 28 /usr/lib/ruby/vendor_ruby/did_you_mean/levenshtein.rb 29 /usr/lib/ruby/vendor_ruby/did_you_mean/jaro_winkler.rb 30 /usr/lib/ruby/vendor_ruby/did_you_mean/spell_checkable.rb 31 /usr/lib/ruby/2.3.0/delegate.rb 32 /usr/lib/ruby/vendor_ruby/did_you_mean/spell_checkers/name_error_checkers/class_name_checker.rb 33 /usr/lib/ruby/vendor_ruby/did_you_mean/spell_checkers/name_error_checkers/variable_name_checker.rb 34 /usr/lib/ruby/vendor_ruby/did_you_mean/spell_checkers/name_error_checkers.rb 35 /usr/lib/ruby/vendor_ruby/did_you_mean/spell_checkers/method_name_checker.rb 36 /usr/lib/ruby/vendor_ruby/did_you_mean/spell_checkers/null_checker.rb 37 /usr/lib/ruby/vendor_ruby/did_you_mean/formatter.rb 38 /usr/lib/ruby/vendor_ruby/did_you_mean.rb 39 /usr/lib/ruby/2.3.0/rubygems/path_support.rb 40 /usr/lib/ruby/2.3.0/rubygems/dependency.rb 41 /var/lib/gems/2.3.0/gems/tensorflow-0.0.1/lib/sciruby/Tensorflow.so 42 /var/lib/gems/2.3.0/gems/tensorflow-0.0.1/lib/tensorflow/opspec.rb 43 /var/lib/gems/2.3.0/gems/tensorflow-0.0.1/lib/tensorflow/tensor.rb 44 /var/lib/gems/2.3.0/gems/tensorflow-0.0.1/lib/tensorflow/graph.rb 45 /var/lib/gems/2.3.0/gems/tensorflow-0.0.1/lib/tensorflow/session.rb 46 /var/lib/gems/2.3.0/gems/tensorflow-0.0.1/lib/tensorflow/session_options.rb 47 /var/lib/gems/2.3.0/gems/tensorflow-0.0.1/lib/tensorflow/status.rb 48 /var/lib/gems/2.3.0/gems/tensorflow-0.0.1/lib/tensorflow/operation.rb 49 /var/lib/gems/2.3.0/gems/tensorflow-0.0.1/lib/tensorflow/savedmodel.rb 50 /var/lib/gems/2.3.0/gems/tensorflow-0.0.1/lib/tensorflow/scope.rb 51 /var/lib/gems/2.3.0/gems/tensorflow-0.0.1/lib/tensorflow/op.rb 52 /var/lib/gems/2.3.0/gems/tensorflow-0.0.1/lib/tensorflow.rb

    • Process memory map:

    00400000-00401000 r-xp 00000000 08:01 11528 /usr/bin/ruby2.3 00600000-00601000 r--p 00000000 08:01 11528 /usr/bin/ruby2.3 00601000-00602000 rw-p 00001000 08:01 11528 /usr/bin/ruby2.3 01bff000-199e0000 rw-p 00000000 00:00 0 [heap] 7f578014c000-7f5785c8a000 rw-p 00000000 00:00 0 7f5791306000-7f5796e44000 rw-p 00000000 00:00 0 7f57972df000-7f579c982000 r--s 00000000 08:01 12446 /usr/lib/libtensorflow.so 7f579c982000-7f57a24c2000 rw-p 00000000 00:00 0 7f57a24c2000-7f57a8000000 rw-p 00000000 00:00 0 7f57a8000000-7f57a8021000 rw-p 00000000 00:00 0 7f57a8021000-7f57ac000000 ---p 00000000 00:00 0 7f57ae37a000-7f57aeb5b000 rw-p 00000000 00:00 0 7f57b0000000-7f57b0021000 rw-p 00000000 00:00 0 7f57b0021000-7f57b4000000 ---p 00000000 00:00 0 7f57b4000000-7f57b4021000 rw-p 00000000 00:00 0 7f57b4021000-7f57b8000000 ---p 00000000 00:00 0 7f57b8000000-7f57b8021000 rw-p 00000000 00:00 0 7f57b8021000-7f57bc000000 ---p 00000000 00:00 0 7f57bf7ff000-7f57bf800000 ---p 00000000 00:00 0 7f57bf800000-7f57c0000000 rw-p 00000000 00:00 0 7f57c0000000-7f57c0021000 rw-p 00000000 00:00 0 7f57c0021000-7f57c4000000 ---p 00000000 00:00 0 7f57c4000000-7f57c4021000 rw-p 00000000 00:00 0 7f57c4021000-7f57c8000000 ---p 00000000 00:00 0 7f57c8000000-7f57c8021000 rw-p 00000000 00:00 0 7f57c8021000-7f57cc000000 ---p 00000000 00:00 0 7f57cc000000-7f57cc021000 rw-p 00000000 00:00 0 7f57cc021000-7f57d0000000 ---p 00000000 00:00 0 7f57d0000000-7f57d0021000 rw-p 00000000 00:00 0 7f57d0021000-7f57d4000000 ---p 00000000 00:00 0 7f57d4000000-7f57d4021000 rw-p 00000000 00:00 0 7f57d4021000-7f57d8000000 ---p 00000000 00:00 0 7f57d8000000-7f57d8021000 rw-p 00000000 00:00 0 7f57d8021000-7f57dc000000 ---p 00000000 00:00 0 7f57dc000000-7f57dc021000 rw-p 00000000 00:00 0 7f57dc021000-7f57e0000000 ---p 00000000 00:00 0 7f57e0000000-7f57e0021000 rw-p 00000000 00:00 0 7f57e0021000-7f57e4000000 ---p 00000000 00:00 0 7f57e4200000-7f57e4600000 rw-p 00000000 00:00 0 7f57e47f9000-7f57e47fa000 ---p 00000000 00:00 0 7f57e47fa000-7f57e4ffa000 rw-p 00000000 00:00 0 7f57e4ffa000-7f57e4ffb000 ---p 00000000 00:00 0 7f57e4ffb000-7f57e57fb000 rw-p 00000000 00:00 0 7f57e57fb000-7f57e57fc000 ---p 00000000 00:00 0 7f57e57fc000-7f57e5ffc000 rw-p 00000000 00:00 0 7f57e5ffc000-7f57e5ffd000 ---p 00000000 00:00 0 7f57e5ffd000-7f57e67fd000 rw-p 00000000 00:00 0 7f57e67fd000-7f57e67fe000 ---p 00000000 00:00 0 7f57e67fe000-7f57e6ffe000 rw-p 00000000 00:00 0 7f57e6ffe000-7f57e6fff000 ---p 00000000 00:00 0 7f57e6fff000-7f57e77ff000 rw-p 00000000 00:00 0 7f57e77ff000-7f57e7800000 ---p 00000000 00:00 0 7f57e7800000-7f57e8000000 rw-p 00000000 00:00 0 7f57e8000000-7f57e8021000 rw-p 00000000 00:00 0 7f57e8021000-7f57ec000000 ---p 00000000 00:00 0 7f57ec000000-7f57ec021000 rw-p 00000000 00:00 0 7f57ec021000-7f57f0000000 ---p 00000000 00:00 0 7f57f0000000-7f57f0021000 rw-p 00000000 00:00 0 7f57f0021000-7f57f4000000 ---p 00000000 00:00 0 7f57f41c1000-7f57f4389000 r--s 00000000 08:01 262822 /lib/x86_64-linux-gnu/libc-2.23.so 7f57f4389000-7f57f45f8000 r--s 00000000 08:01 11523 /usr/lib/x86_64-linux-gnu/libruby-2.3.so.2.3.0 7f57f45f8000-7f57f45f9000 ---p 00000000 00:00 0 7f57f45f9000-7f57f4df9000 rw-p 00000000 00:00 0 7f57f4df9000-7f57f4dfa000 ---p 00000000 00:00 0 7f57f4dfa000-7f57f55fa000 rw-p 00000000 00:00 0 7f57f55fa000-7f57f55fb000 ---p 00000000 00:00 0 7f57f55fb000-7f57f5dfb000 rw-p 00000000 00:00 0 7f57f5dfb000-7f57f5dfc000 ---p 00000000 00:00 0 7f57f5dfc000-7f57f65fc000 rw-p 00000000 00:00 0 7f57f65fc000-7f57f65fd000 ---p 00000000 00:00 0 7f57f65fd000-7f57f6dfd000 rw-p 00000000 00:00 0 7f57f6dfd000-7f57f6dfe000 ---p 00000000 00:00 0 7f57f6dfe000-7f57f75fe000 rw-p 00000000 00:00 0 7f57f75fe000-7f57f75ff000 ---p 00000000 00:00 0 7f57f75ff000-7f57f7dff000 rw-p 00000000 00:00 0 7f57f7dff000-7f57f7e00000 ---p 00000000 00:00 0 7f57f7e00000-7f57f8600000 rw-p 00000000 00:00 0 7f57f8600000-7f57f8800000 rw-p 00000000 00:00 0 7f57f8800000-7f57f8a00000 rw-p 00000000 00:00 0 7f57f8a23000-7f57f8a39000 r-xp 00000000 08:01 262801 /lib/x86_64-linux-gnu/libgcc_s.so.1 7f57f8a39000-7f57f8c38000 ---p 00016000 08:01 262801 /lib/x86_64-linux-gnu/libgcc_s.so.1 7f57f8c38000-7f57f8c39000 rw-p 00015000 08:01 262801 /lib/x86_64-linux-gnu/libgcc_s.so.1 7f57f8c39000-7f57f8dab000 r-xp 00000000 08:01 149 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21 7f57f8dab000-7f57f8fab000 ---p 00172000 08:01 149 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21 7f57f8fab000-7f57f8fb5000 r--p 00172000 08:01 149 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21 7f57f8fb5000-7f57f8fb7000 rw-p 0017c000 08:01 149 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21 7f57f8fb7000-7f57f8fbb000 rw-p 00000000 00:00 0 7f57f8fbb000-7f57fcdf2000 r-xp 00000000 08:01 12446 /usr/lib/libtensorflow.so 7f57fcdf2000-7f57fcdf3000 ---p 03e37000 08:01 12446 /usr/lib/libtensorflow.so 7f57fcdf3000-7f57fcee6000 r--p 03e37000 08:01 12446 /usr/lib/libtensorflow.so 7f57fcee6000-7f57fcee7000 rw-p 03f2a000 08:01 12446 /usr/lib/libtensorflow.so 7f57fcee7000-7f57fceef000 rw-p 00000000 00:00 0 7f57fceef000-7f57fcf75000 r-xp 00000000 08:01 13805 /var/lib/gems/2.3.0/gems/tensorflow-0.0.1/lib/sciruby/Tensorflow.so 7f57fcf75000-7f57fd175000 ---p 00086000 08:01 13805 /var/lib/gems/2.3.0/gems/tensorflow-0.0.1/lib/sciruby/Tensorflow.so 7f57fd175000-7f57fd177000 r--p 00086000 08:01 13805 /var/lib/gems/2.3.0/gems/tensorflow-0.0.1/lib/sciruby/Tensorflow.so 7f57fd177000-7f57fd17a000 rw-p 00088000 08:01 13805 /var/lib/gems/2.3.0/gems/tensorflow-0.0.1/lib/sciruby/Tensorflow.so 7f57fd17a000-7f57fd181000 r-xp 00000000 08:01 143445 /usr/lib/x86_64-linux-gnu/ruby/2.3.0/stringio.so 7f57fd181000-7f57fd380000 ---p 00007000 08:01 143445 /usr/lib/x86_64-linux-gnu/ruby/2.3.0/stringio.so 7f57fd380000-7f57fd381000 r--p 00006000 08:01 143445 /usr/lib/x86_64-linux-gnu/ruby/2.3.0/stringio.so 7f57fd381000-7f57fd382000 rw-p 00007000 08:01 143445 /usr/lib/x86_64-linux-gnu/ruby/2.3.0/stringio.so 7f57fd382000-7f57fd384000 r-xp 00000000 08:01 143504 /usr/lib/x86_64-linux-gnu/ruby/2.3.0/enc/trans/transdb.so 7f57fd384000-7f57fd584000 ---p 00002000 08:01 143504 /usr/lib/x86_64-linux-gnu/ruby/2.3.0/enc/trans/transdb.so 7f57fd584000-7f57fd585000 r--p 00002000 08:01 143504 /usr/lib/x86_64-linux-gnu/ruby/2.3.0/enc/trans/transdb.so 7f57fd585000-7f57fd586000 rw-p 00003000 08:01 143504 /usr/lib/x86_64-linux-gnu/ruby/2.3.0/enc/trans/transdb.so 7f57fd586000-7f57fd588000 r-xp 00000000 08:01 143535 /usr/lib/x86_64-linux-gnu/ruby/2.3.0/enc/encdb.so 7f57fd588000-7f57fd787000 ---p 00002000 08:01 143535 /usr/lib/x86_64-linux-gnu/ruby/2.3.0/enc/encdb.so 7f57fd787000-7f57fd788000 r--p 00001000 08:01 143535 /usr/lib/x86_64-linux-gnu/ruby/2.3.0/enc/encdb.so 7f57fd788000-7f57fd789000 rw-p 00002000 08:01 143535 /usr/lib/x86_64-linux-gnu/ruby/2.3.0/enc/encdb.so 7f57fd789000-7f57fda1e000 r--p 00000000 08:01 1822 /usr/lib/locale/locale-archive 7f57fda1e000-7f57fdb26000 r-xp 00000000 08:01 262809 /lib/x86_64-linux-gnu/libm-2.23.so 7f57fdb26000-7f57fdd25000 ---p 00108000 08:01 262809 /lib/x86_64-linux-gnu/libm-2.23.so 7f57fdd25000-7f57fdd26000 r--p 00107000 08:01 262809 /lib/x86_64-linux-gnu/libm-2.23.so 7f57fdd26000-7f57fdd27000 rw-p 00108000 08:01 262809 /lib/x86_64-linux-gnu/libm-2.23.so 7f57fdd27000-7f57fdd30000 r-xp 00000000 08:01 271223 /lib/x86_64-linux-gnu/libcrypt-2.23.so 7f57fdd30000-7f57fdf2f000 ---p 00009000 08:01 271223 /lib/x86_64-linux-gnu/libcrypt-2.23.so 7f57fdf2f000-7f57fdf30000 r--p 00008000 08:01 271223 /lib/x86_64-linux-gnu/libcrypt-2.23.so 7f57fdf30000-7f57fdf31000 rw-p 00009000 08:01 271223 /lib/x86_64-linux-gnu/libcrypt-2.23.so 7f57fdf31000-7f57fdf5f000 rw-p 00000000 00:00 0 7f57fdf5f000-7f57fdf62000 r-xp 00000000 08:01 262796 /lib/x86_64-linux-gnu/libdl-2.23.so 7f57fdf62000-7f57fe161000 ---p 00003000 08:01 262796 /lib/x86_64-linux-gnu/libdl-2.23.so 7f57fe161000-7f57fe162000 r--p 00002000 08:01 262796 /lib/x86_64-linux-gnu/libdl-2.23.so 7f57fe162000-7f57fe163000 rw-p 00003000 08:01 262796 /lib/x86_64-linux-gnu/libdl-2.23.so 7f57fe163000-7f57fe1e2000 r-xp 00000000 08:01 2363 /usr/lib/x86_64-linux-gnu/libgmp.so.10.3.0 7f57fe1e2000-7f57fe3e1000 ---p 0007f000 08:01 2363 /usr/lib/x86_64-linux-gnu/libgmp.so.10.3.0 7f57fe3e1000-7f57fe3e2000 r--p 0007e000 08:01 2363 /usr/lib/x86_64-linux-gnu/libgmp.so.10.3.0 7f57fe3e2000-7f57fe3e3000 rw-p 0007f000 08:01 2363 /usr/lib/x86_64-linux-gnu/libgmp.so.10.3.0 7f57fe3e3000-7f57fe3fb000 r-xp 00000000 08:01 262891 /lib/x86_64-linux-gnu/libpthread-2.23.so 7f57fe3fb000-7f57fe5fa000 ---p 00018000 08:01 262891 /lib/x86_64-linux-gnu/libpthread-2.23.so 7f57fe5fa000-7f57fe5fb000 r--p 00017000 08:01 262891 /lib/x86_64-linux-gnu/libpthread-2.23.so 7f57fe5fb000-7f57fe5fc000 rw-p 00018000 08:01 262891 /lib/x86_64-linux-gnu/libpthread-2.23.so 7f57fe5fc000-7f57fe600000 rw-p 00000000 00:00 0 7f57fe600000-7f57fe7bf000 r-xp 00000000 08:01 262822 /lib/x86_64-linux-gnu/libc-2.23.so 7f57fe7bf000-7f57fe9bf000 ---p 001bf000 08:01 262822 /lib/x86_64-linux-gnu/libc-2.23.so 7f57fe9bf000-7f57fe9c3000 r--p 001bf000 08:01 262822 /lib/x86_64-linux-gnu/libc-2.23.so 7f57fe9c3000-7f57fe9c5000 rw-p 001c3000 08:01 262822 /lib/x86_64-linux-gnu/libc-2.23.so 7f57fe9c5000-7f57fe9c9000 rw-p 00000000 00:00 0 7f57fe9c9000-7f57fec31000 r-xp 00000000 08:01 11523 /usr/lib/x86_64-linux-gnu/libruby-2.3.so.2.3.0 7f57fec31000-7f57fee30000 ---p 00268000 08:01 11523 /usr/lib/x86_64-linux-gnu/libruby-2.3.so.2.3.0 7f57fee30000-7f57fee36000 r--p 00267000 08:01 11523 /usr/lib/x86_64-linux-gnu/libruby-2.3.so.2.3.0 7f57fee36000-7f57fee37000 rw-p 0026d000 08:01 11523 /usr/lib/x86_64-linux-gnu/libruby-2.3.so.2.3.0 7f57fee37000-7f57fee47000 rw-p 00000000 00:00 0 7f57fee47000-7f57fee6d000 r-xp 00000000 08:01 262833 /lib/x86_64-linux-gnu/ld-2.23.so 7f57fef5c000-7f57ff062000 rw-p 00000000 00:00 0 7f57ff064000-7f57ff066000 r--s 00000000 08:01 11528 /usr/bin/ruby2.3 7f57ff066000-7f57ff067000 ---p 00000000 00:00 0 7f57ff067000-7f57ff06c000 rw-p 00000000 00:00 0 7f57ff06c000-7f57ff06d000 r--p 00025000 08:01 262833 /lib/x86_64-linux-gnu/ld-2.23.so 7f57ff06d000-7f57ff06e000 rw-p 00026000 08:01 262833 /lib/x86_64-linux-gnu/ld-2.23.so 7f57ff06e000-7f57ff06f000 rw-p 00000000 00:00 0 7ffc9bb9d000-7ffc9c39c000 rw-p 00000000 00:00 0 [stack] 7ffc9c3d5000-7ffc9c3d7000 r--p 00000000 00:00 0 [vvar] 7ffc9c3d7000-7ffc9c3d9000 r-xp 00000000 00:00 0 [vdso] ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]

    [NOTE] You may have encountered a bug in the Ruby interpreter or extension libraries. Bug reports are welcome. For details: http://www.ruby-lang.org/bugreport.html

    Aborted `

    opened by Zigngit 7
  • Fix default op-naming

    Fix default op-naming

    I began implementing tf.zeros (a special kind of constant-op with all 0s – taking only shape as required argument) and found that our constant()-method doesn't work with scalars and doesn't take shape as an argument. Writing specs for that, I then discovered that our default_names- method uses a character, :, that makes it unretrievable from the TensorFlow graph.

    • : is not allowed in names on the actual (not the wrapper) TensorFlow graph
    • make constant() compliant (https://www.tensorflow.org/versions/r0.10/api_docs/python/constant_op.html#constant), e.g. work on scalars and take shape as argument
    • ... then build zeros()
    opened by chrhansen 6
  • update roadmap

    update roadmap

    Just some minor tweaks to the Readme and Roadmap, to make it slightly more accessible for new users/contributors. The only really substantive change is adding support for default graphs to the roadmap.

    Let me know if you think these changes make sense @Arafatk! Also I would be happy to work on default graph support if you agree that that is worth having. (Technically that's necessary for the basic usage tutorial, and I think it's a pretty important convenience for new users)

    opened by geoffreylitt 6
  • Unable to install with ruby 2.2.5

    Unable to install with ruby 2.2.5

    I am getting the following output on running 'make'

    compiling Tensorflow_wrap.cxx In file included from Tensorflow_wrap.cxx:2733: ././files/tf_tensor_helper.cc:43:46: error: arithmetic on a pointer to void *(char *)(buffer_data_pointer+i) = file_string[i]; ~~~~~~~~~~~~~~~~~~~^ ././files/tf_tensor_helper.cc:52:56: error: arithmetic on a pointer to void buffer += *(char *)(buffer_data_pointer+i); ~~~~~~~~~~~~~~~~~~~^ ././files/tf_tensor_helper.cc:264:39: error: arithmetic on a pointer to void auto dst_str = (char *)(cbytes+8); ~~~~~~^ ././files/tf_tensor_helper.cc:274:36: error: arithmetic on a pointer to void auto src = (char *)(cbytes + 8); ~~~~~~ ^ 4 errors generated. make: *** [Tensorflow_wrap.o] Error 1

    opened by aishmita-aggarwal 5
  • Docker image failing with Segmentation fault error on running classify_image.rb

    Docker image failing with Segmentation fault error on running classify_image.rb

    Here's the log:

    `root@c8f53aedb9b3:/repos/tensorflow.rb/image# ruby classify_image.rb E tensorflow/core/client/tensor_c_api.cc:485] FeedInputs: unable to find feed output Mul /usr/local/rvm/gems/ruby-2.2.4@ruby-tensorflow/gems/tensorflow-0.0.1/lib/tensorflow/session.rb:103: [BUG] Segmentation fault at 0x00000000000017 ruby 2.2.4p230 (2015-12-16 revision 53155) [x86_64-linux]

    -- Control frame information ----------------------------------------------- c:0007 p:---- s:0043 e:000042 CFUNC :tensor_size c:0006 p:0015 s:0039 e:000038 METHOD /usr/local/rvm/gems/ruby-2.2.4@ruby-tensorflow/gems/tensorflow-0.0.1/lib/tensorflow/session.rb:103 c:0005 p:0009 s:0032 e:000031 BLOCK /usr/local/rvm/gems/ruby-2.2.4@ruby-tensorflow/gems/tensorflow-0.0.1/lib/tensorflow/session.rb:42 [FINISH] c:0004 p:---- s:0028 e:000027 CFUNC :each c:0003 p:0125 s:0025 e:000024 METHOD /usr/local/rvm/gems/ruby-2.2.4@ruby-tensorflow/gems/tensorflow-0.0.1/lib/tensorflow/session.rb:41 c:0002 p:0132 s:0012 E:0026e0 EVAL classify_image.rb:37 [FINISH] c:0001 p:0000 s:0002 E:001b10 TOP [FINISH]

    -- Ruby level backtrace information ---------------------------------------- classify_image.rb:37:in <main>' /usr/local/rvm/gems/ruby-2.2.4@ruby-tensorflow/gems/tensorflow-0.0.1/lib/tensorflow/session.rb:41:inrun' /usr/local/rvm/gems/ruby-2.2.4@ruby-tensorflow/gems/tensorflow-0.0.1/lib/tensorflow/session.rb:41:in each' /usr/local/rvm/gems/ruby-2.2.4@ruby-tensorflow/gems/tensorflow-0.0.1/lib/tensorflow/session.rb:42:inblock in run' /usr/local/rvm/gems/ruby-2.2.4@ruby-tensorflow/gems/tensorflow-0.0.1/lib/tensorflow/session.rb:103:in convert_value_for_output_array' /usr/local/rvm/gems/ruby-2.2.4@ruby-tensorflow/gems/tensorflow-0.0.1/lib/tensorflow/session.rb:103:intensor_size'

    -- Machine register context ------------------------------------------------ RIP: 0x00007fc343f96fde RBP: 0x00007ffc763966f0 RSP: 0x00007ffc763966e0 RAX: 0x0000000000000017 RBX: 0x0000000000000001 RCX: 0x0000000000000000 RDX: 0x00007fc3494923a0 RDI: 0x0000000000000008 RSI: 0x00007ffc76396938 R8: 0x0000000000000000 R9: 0x00007fc34b6481b0 R10: 0x00007fc34b747e30 R11: 0x0000000001b279a0 R12: 0x00007fc34b747e30 R13: 0x0000000001a893b0 R14: 0x000000000180fce0 R15: 0x0000000001a87470 EFL: 0x0000000000010216

    -- C level backtrace information ------------------------------------------- /usr/local/rvm/rubies/ruby-2.2.4/lib/libruby.so.2.2(rb_vm_bugreport+0x4ea) [0x7fc34b24178a] vm_dump.c:693 /usr/local/rvm/rubies/ruby-2.2.4/lib/libruby.so.2.2(rb_bug_context+0xcb) [0x7fc34b0dc91b] error.c:425 /usr/local/rvm/rubies/ruby-2.2.4/lib/libruby.so.2.2(sigsegv+0x3e) [0x7fc34b1ba0ce] signal.c:879 /lib/x86_64-linux-gnu/libc.so.6 [0x7fc34accd4a0] /usr/lib/libtensorflow.so(_ZNK10tensorflow11TensorShape3tagEv+0x1c) [0x7fc343f96fde] /usr/lib/libtensorflow.so(_ZNK10tensorflow11TensorShape4dimsEv+0x31) [0x7fc343f96ead] /usr/lib/libtensorflow.so(TF_NumDims+0x1c) [0x7fc3463411a0] /usr/local/rvm/gems/ruby-2.2.4@ruby-tensorflow/gems/tensorflow-0.0.1/lib/sciruby/Tensorflow.so(_ZN10tensorflow11tensor_sizeEP9TF_Tensor+0x18) [0x7fc34921e7db] /usr/local/rvm/gems/ruby-2.2.4@ruby-tensorflow/gems/tensorflow-0.0.1/lib/sciruby/Tensorflow.so [0x7fc349249a4d] /usr/local/rvm/rubies/ruby-2.2.4/lib/libruby.so.2.2(vm_call_cfunc+0x122) [0x7fc34b22a192] vm_insnhelper.c:1380 /usr/local/rvm/rubies/ruby-2.2.4/lib/libruby.so.2.2(vm_exec_core+0x1373) [0x7fc34b230a73] insns.def:1070 /usr/local/rvm/rubies/ruby-2.2.4/lib/libruby.so.2.2(vm_exec+0x7b) [0x7fc34b2354ab] vm.c:1435 /usr/local/rvm/rubies/ruby-2.2.4/lib/libruby.so.2.2(invoke_block_from_c+0x3cc) [0x7fc34b239f2c] vm.c:813 /usr/local/rvm/rubies/ruby-2.2.4/lib/libruby.so.2.2(rb_yield+0x5b) [0x7fc34b23a90b] vm.c:853 /usr/local/rvm/gems/ruby-2.2.4@ruby-tensorflow/gems/tensorflow-0.0.1/lib/sciruby/Tensorflow.so [0x7fc3492238d0] /usr/local/rvm/gems/ruby-2.2.4@ruby-tensorflow/gems/tensorflow-0.0.1/lib/sciruby/Tensorflow.so [0x7fc3492381fd] /usr/local/rvm/rubies/ruby-2.2.4/lib/libruby.so.2.2(vm_call_cfunc+0x122) [0x7fc34b22a192] vm_insnhelper.c:1380 /usr/local/rvm/rubies/ruby-2.2.4/lib/libruby.so.2.2(vm_exec_core+0x12c8) [0x7fc34b2309c8] insns.def:1040 /usr/local/rvm/rubies/ruby-2.2.4/lib/libruby.so.2.2(vm_exec+0x7b) [0x7fc34b2354ab] vm.c:1435 /usr/local/rvm/rubies/ruby-2.2.4/lib/libruby.so.2.2(rb_iseq_eval_main+0x203) [0x7fc34b236a03] vm.c:1680 /usr/local/rvm/rubies/ruby-2.2.4/lib/libruby.so.2.2(ruby_exec_internal+0xbd) [0x7fc34b0e216d] eval.c:252 /usr/local/rvm/rubies/ruby-2.2.4/lib/libruby.so.2.2(ruby_exec_node+0x1d) [0x7fc34b0e467d] eval.c:317 /usr/local/rvm/rubies/ruby-2.2.4/lib/libruby.so.2.2(ruby_run_node+0x1e) [0x7fc34b0e6e4e] eval.c:309 /usr/local/rvm/rubies/ruby-2.2.4/bin/ruby(main+0x4b) [0x40087b] main.c:36

    -- Other runtime information -----------------------------------------------

    • Loaded script: classify_image.rb

    • Loaded features:

      0 enumerator.so 1 rational.so 2 complex.so 3 /usr/local/rvm/rubies/ruby-2.2.4/lib/ruby/2.2.0/x86_64-linux/enc/encdb.so 4 /usr/local/rvm/rubies/ruby-2.2.4/lib/ruby/2.2.0/x86_64-linux/enc/trans/transdb.so 5 /usr/local/rvm/rubies/ruby-2.2.4/lib/ruby/2.2.0/unicode_normalize.rb 6 /usr/local/rvm/rubies/ruby-2.2.4/lib/ruby/2.2.0/x86_64-linux/rbconfig.rb 7 thread.rb 8 /usr/local/rvm/rubies/ruby-2.2.4/lib/ruby/2.2.0/x86_64-linux/thread.so 9 /usr/local/rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/compatibility.rb 10 /usr/local/rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/defaults.rb 11 /usr/local/rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/deprecate.rb 12 /usr/local/rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/errors.rb 13 /usr/local/rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/version.rb 14 /usr/local/rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/requirement.rb 15 /usr/local/rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/platform.rb 16 /usr/local/rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/basic_specification.rb 17 /usr/local/rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/stub_specification.rb 18 /usr/local/rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/util/stringio.rb 19 /usr/local/rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/specification.rb 20 /usr/local/rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/exceptions.rb 21 /usr/local/rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_gem.rb 22 /usr/local/rvm/rubies/ruby-2.2.4/lib/ruby/2.2.0/monitor.rb 23 /usr/local/rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb 24 /usr/local/rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems.rb 25 /usr/local/rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/path_support.rb 26 /usr/local/rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/dependency.rb 27 /usr/local/rvm/rubies/ruby-2.2.4/lib/ruby/2.2.0/x86_64-linux/stringio.so 28 /usr/local/rvm/gems/ruby-2.2.4@ruby-tensorflow/gems/ruby-protocol-buffers-1.6.1/lib/protocol_buffers/version.rb 29 /usr/local/rvm/gems/ruby-2.2.4@ruby-tensorflow/gems/ruby-protocol-buffers-1.6.1/lib/protocol_buffers/runtime/enum.rb 30 /usr/local/rvm/gems/ruby-2.2.4@ruby-tensorflow/gems/ruby-protocol-buffers-1.6.1/lib/protocol_buffers/runtime/varint.rb 31 /usr/local/rvm/gems/ruby-2.2.4@ruby-tensorflow/gems/ruby-protocol-buffers-1.6.1/lib/protocol_buffers/limited_io.rb 32 /usr/local/rvm/gems/ruby-2.2.4@ruby-tensorflow/gems/ruby-protocol-buffers-1.6.1/lib/protocol_buffers/runtime/field.rb 33 /usr/local/rvm/gems/ruby-2.2.4@ruby-tensorflow/gems/ruby-protocol-buffers-1.6.1/lib/protocol_buffers/runtime/encoder.rb 34 /usr/local/rvm/gems/ruby-2.2.4@ruby-tensorflow/gems/ruby-protocol-buffers-1.6.1/lib/protocol_buffers/runtime/decoder.rb 35 /usr/local/rvm/gems/ruby-2.2.4@ruby-tensorflow/gems/ruby-protocol-buffers-1.6.1/lib/protocol_buffers/runtime/text_formatter.rb 36 /usr/local/rvm/rubies/ruby-2.2.4/lib/ruby/2.2.0/x86_64-linux/racc/cparse.so 37 /usr/local/rvm/rubies/ruby-2.2.4/lib/ruby/2.2.0/racc/parser.rb 38 /usr/local/rvm/rubies/ruby-2.2.4/lib/ruby/2.2.0/x86_64-linux/strscan.so 39 /usr/local/rvm/gems/ruby-2.2.4@ruby-tensorflow/gems/ruby-protocol-buffers-1.6.1/lib/protocol_buffers/runtime/text_scanner.rb 40 /usr/local/rvm/gems/ruby-2.2.4@ruby-tensorflow/gems/ruby-protocol-buffers-1.6.1/lib/protocol_buffers/runtime/text_parser.rb 41 /usr/local/rvm/gems/ruby-2.2.4@ruby-tensorflow/gems/ruby-protocol-buffers-1.6.1/lib/protocol_buffers/runtime/message.rb 42 /usr/local/rvm/gems/ruby-2.2.4@ruby-tensorflow/gems/ruby-protocol-buffers-1.6.1/lib/protocol_buffers/runtime/rpc.rb 43 /usr/local/rvm/gems/ruby-2.2.4@ruby-tensorflow/gems/ruby-protocol-buffers-1.6.1/lib/protocol_buffers/runtime/service.rb 44 /usr/local/rvm/gems/ruby-2.2.4@ruby-tensorflow/gems/ruby-protocol-buffers-1.6.1/lib/protocol_buffers.rb 45 /usr/local/rvm/gems/ruby-2.2.4@ruby-tensorflow/gems/tensorflow-0.0.1/lib/tensorflow/core/framework/tensor_shape.pb.rb 46 /usr/local/rvm/gems/ruby-2.2.4@ruby-tensorflow/gems/tensorflow-0.0.1/lib/tensorflow/core/framework/types.pb.rb 47 /usr/local/rvm/gems/ruby-2.2.4@ruby-tensorflow/gems/tensorflow-0.0.1/lib/tensorflow/core/framework/tensor.pb.rb 48 /usr/local/rvm/gems/ruby-2.2.4@ruby-tensorflow/gems/tensorflow-0.0.1/lib/tensorflow/core/framework/attr_value.pb.rb 49 /usr/local/rvm/gems/ruby-2.2.4@ruby-tensorflow/gems/tensorflow-0.0.1/lib/tensorflow/core/framework/op_def.pb.rb 50 /usr/local/rvm/gems/ruby-2.2.4@ruby-tensorflow/gems/tensorflow-0.0.1/lib/tensorflow/core/framework/function.pb.rb 51 /usr/local/rvm/gems/ruby-2.2.4@ruby-tensorflow/gems/tensorflow-0.0.1/lib/tensorflow/core/framework/versions.pb.rb 52 /usr/local/rvm/gems/ruby-2.2.4@ruby-tensorflow/gems/tensorflow-0.0.1/lib/tensorflow/core/framework/graph.pb.rb 53 /usr/local/rvm/gems/ruby-2.2.4@ruby-tensorflow/gems/tensorflow-0.0.1/lib/sciruby/Tensorflow.so 54 /usr/local/rvm/gems/ruby-2.2.4@ruby-tensorflow/gems/narray-0.6.1.2/narray/nmatrix.rb 55 /usr/local/rvm/gems/ruby-2.2.4@ruby-tensorflow/gems/narray-0.6.1.2/narray/narray_ext.rb 56 /usr/local/rvm/gems/ruby-2.2.4@ruby-tensorflow/gems/narray-0.6.1.2/narray.so 57 /usr/local/rvm/gems/ruby-2.2.4@ruby-tensorflow/gems/tensorflow-0.0.1/lib/tensorflow/tensor.rb 58 /usr/local/rvm/gems/ruby-2.2.4@ruby-tensorflow/gems/tensorflow-0.0.1/lib/tensorflow/graph.rb 59 /usr/local/rvm/gems/ruby-2.2.4@ruby-tensorflow/gems/tensorflow-0.0.1/lib/tensorflow/session.rb 60 /usr/local/rvm/gems/ruby-2.2.4@ruby-tensorflow/gems/tensorflow-0.0.1/lib/tensorflow.rb

    • Process memory map:

    00400000-00401000 r-xp 00000000 08:01 3412249 /usr/local/rvm/rubies/ruby-2.2.4/bin/ruby 00600000-00601000 r--p 00000000 08:01 3412249 /usr/local/rvm/rubies/ruby-2.2.4/bin/ruby 00601000-00602000 rw-p 00001000 08:01 3412249 /usr/local/rvm/rubies/ruby-2.2.4/bin/ruby 017dc000-0b807000 rw-p 00000000 00:00 0 [heap] 7fc2e82a0000-7fc300298000 r--s 00000000 08:01 3035139 /usr/lib/libtensorflow.so 7fc300298000-7fc305e99000 rw-p 00000000 00:00 0 7fc30b183000-7fc30b34b000 r--s 00000000 08:01 2239031 /lib/x86_64-linux-gnu/libc-2.23.so 7fc30b34b000-7fc30c000000 r--s 00000000 08:01 3412286 /usr/local/rvm/rubies/ruby-2.2.4/lib/libruby.so.2.2.0 7fc30c000000-7fc30c20d000 rw-p 00000000 00:00 0 7fc30c20d000-7fc310000000 ---p 00000000 00:00 0 7fc3100aa000-7fc314000000 rw-p 00000000 00:00 0 7fc314000000-7fc314021000 rw-p 00000000 00:00 0 7fc314021000-7fc318000000 ---p 00000000 00:00 0 7fc318000000-7fc318021000 rw-p 00000000 00:00 0 7fc318021000-7fc31c000000 ---p 00000000 00:00 0 7fc31c000000-7fc31c021000 rw-p 00000000 00:00 0 7fc31c021000-7fc320000000 ---p 00000000 00:00 0 7fc320000000-7fc320021000 rw-p 00000000 00:00 0 7fc320021000-7fc324000000 ---p 00000000 00:00 0 7fc324000000-7fc324021000 rw-p 00000000 00:00 0 7fc324021000-7fc328000000 ---p 00000000 00:00 0 7fc328000000-7fc328021000 rw-p 00000000 00:00 0 7fc328021000-7fc32c000000 ---p 00000000 00:00 0 7fc32c000000-7fc32c021000 rw-p 00000000 00:00 0 7fc32c021000-7fc330000000 ---p 00000000 00:00 0 7fc330017000-7fc330ffa000 rw-p 00000000 00:00 0 7fc330ffa000-7fc330ffb000 ---p 00000000 00:00 0 7fc330ffb000-7fc3317fb000 rw-p 00000000 00:00 0 7fc3317fb000-7fc3317fc000 ---p 00000000 00:00 0 7fc3317fc000-7fc331ffc000 rw-p 00000000 00:00 0 7fc331ffc000-7fc331ffd000 ---p 00000000 00:00 0 7fc331ffd000-7fc3327fd000 rw-p 00000000 00:00 0 7fc3327fd000-7fc3327fe000 ---p 00000000 00:00 0 7fc3327fe000-7fc332ffe000 rw-p 00000000 00:00 0 7fc332ffe000-7fc332fff000 ---p 00000000 00:00 0 7fc332fff000-7fc3337ff000 rw-p 00000000 00:00 0 7fc3337ff000-7fc333800000 ---p 00000000 00:00 0 7fc333800000-7fc334000000 rw-p 00000000 00:00 0 7fc334000000-7fc334021000 rw-p 00000000 00:00 0 7fc334021000-7fc338000000 ---p 00000000 00:00 0 7fc3380ff000-7fc338100000 ---p 00000000 00:00 0 7fc338100000-7fc338900000 rw-p 00000000 00:00 0 7fc338900000-7fc338901000 ---p 00000000 00:00 0 7fc338901000-7fc339101000 rw-p 00000000 00:00 0 7fc339101000-7fc339102000 ---p 00000000 00:00 0 7fc339102000-7fc339902000 rw-p 00000000 00:00 0 7fc339902000-7fc33993a000 r-xp 00000000 08:01 3539588 /usr/local/rvm/gems/ruby-2.2.4@ruby-tensorflow/gems/narray-0.6.1.2/narray.so 7fc33993a000-7fc339b39000 ---p 00038000 08:01 3539588 /usr/local/rvm/gems/ruby-2.2.4@ruby-tensorflow/gems/narray-0.6.1.2/narray.so 7fc339b39000-7fc339b3a000 r--p 00037000 08:01 3539588 /usr/local/rvm/gems/ruby-2.2.4@ruby-tensorflow/gems/narray-0.6.1.2/narray.so 7fc339b3a000-7fc339b3d000 rw-p 00038000 08:01 3539588 /usr/local/rvm/gems/ruby-2.2.4@ruby-tensorflow/gems/narray-0.6.1.2/narray.so 7fc339b3d000-7fc339b3e000 rw-p 00000000 00:00 0 7fc339b3e000-7fc339b57000 r-xp 00000000 08:01 2239229 /lib/x86_64-linux-gnu/libz.so.1.2.8 7fc339b57000-7fc339d56000 ---p 00019000 08:01 2239229 /lib/x86_64-linux-gnu/libz.so.1.2.8 7fc339d56000-7fc339d57000 r--p 00018000 08:01 2239229 /lib/x86_64-linux-gnu/libz.so.1.2.8 7fc339d57000-7fc339d58000 rw-p 00019000 08:01 2239229 /lib/x86_64-linux-gnu/libz.so.1.2.8 7fc339d58000-7fc339d6e000 r-xp 00000000 08:01 2239150 /lib/x86_64-linux-gnu/libgcc_s.so.1 7fc339d6e000-7fc339f6d000 ---p 00016000 08:01 2239150 /lib/x86_64-linux-gnu/libgcc_s.so.1 7fc339f6d000-7fc339f6e000 rw-p 00015000 08:01 2239150 /lib/x86_64-linux-gnu/libgcc_s.so.1 7fc339f6e000-7fc33a0e0000 r-xp 00000000 08:01 2371253 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21 7fc33a0e0000-7fc33a2e0000 ---p 00172000 08:01 2371253 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21 7fc33a2e0000-7fc33a2ea000 r--p 00172000 08:01 2371253 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21 7fc33a2ea000-7fc33a2ec000 rw-p 0017c000 08:01 2371253 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21 7fc33a2ec000-7fc33a2f0000 rw-p 00000000 00:00 0 7fc33a2f0000-7fc348cc4000 r-xp 00000000 08:01 3035139 /usr/lib/libtensorflow.so 7fc348cc4000-7fc348ec3000 ---p 0e9d4000 08:01 3035139 /usr/lib/libtensorflow.so 7fc348ec3000-7fc348f50000 r--p 0e9d3000 08:01 3035139 /usr/lib/libtensorflow.so 7fc348f50000-7fc3491d0000 rw-p 0ea60000 08:01 3035139 /usr/lib/libtensorflow.so 7fc3491d0000-7fc3491d3000 rw-p 00000000 00:00 0 7fc3491d3000-7fc34928f000 r-xp 00000000 08:01 3542562 /usr/local/rvm/gems/ruby-2.2.4@ruby-tensorflow/gems/tensorflow-0.0.1/lib/sciruby/Tensorflow.so 7fc34928f000-7fc34948e000 ---p 000bc000 08:01 3542562 /usr/local/rvm/gems/ruby-2.2.4@ruby-tensorflow/gems/tensorflow-0.0.1/lib/sciruby/Tensorflow.so 7fc34948e000-7fc34948f000 r--p 000bb000 08:01 3542562 /usr/local/rvm/gems/ruby-2.2.4@ruby-tensorflow/gems/tensorflow-0.0.1/lib/sciruby/Tensorflow.so 7fc34948f000-7fc349494000 rw-p 000bc000 08:01 3542562 /usr/local/rvm/gems/ruby-2.2.4@ruby-tensorflow/gems/tensorflow-0.0.1/lib/sciruby/Tensorflow.so 7fc349494000-7fc349495000 rw-p 00000000 00:00 0 7fc349495000-7fc34949b000 r-xp 00000000 08:01 3413246 /usr/local/rvm/rubies/ruby-2.2.4/lib/ruby/2.2.0/x86_64-linux/strscan.so 7fc34949b000-7fc34969a000 ---p 00006000 08:01 3413246 /usr/local/rvm/rubies/ruby-2.2.4/lib/ruby/2.2.0/x86_64-linux/strscan.so 7fc34969a000-7fc34969b000 r--p 00005000 08:01 3413246 /usr/local/rvm/rubies/ruby-2.2.4/lib/ruby/2.2.0/x86_64-linux/strscan.so 7fc34969b000-7fc34969c000 rw-p 00006000 08:01 3413246 /usr/local/rvm/rubies/ruby-2.2.4/lib/ruby/2.2.0/x86_64-linux/strscan.so 7fc34969c000-7fc3496a0000 r-xp 00000000 08:01 3413237 /usr/local/rvm/rubies/ruby-2.2.4/lib/ruby/2.2.0/x86_64-linux/racc/cparse.so 7fc3496a0000-7fc34989f000 ---p 00004000 08:01 3413237 /usr/local/rvm/rubies/ruby-2.2.4/lib/ruby/2.2.0/x86_64-linux/racc/cparse.so 7fc34989f000-7fc3498a0000 r--p 00003000 08:01 3413237 /usr/local/rvm/rubies/ruby-2.2.4/lib/ruby/2.2.0/x86_64-linux/racc/cparse.so 7fc3498a0000-7fc3498a1000 rw-p 00004000 08:01 3413237 /usr/local/rvm/rubies/ruby-2.2.4/lib/ruby/2.2.0/x86_64-linux/racc/cparse.so 7fc3498a1000-7fc3498a9000 r-xp 00000000 08:01 3413245 /usr/local/rvm/rubies/ruby-2.2.4/lib/ruby/2.2.0/x86_64-linux/stringio.so 7fc3498a9000-7fc349aa8000 ---p 00008000 08:01 3413245 /usr/local/rvm/rubies/ruby-2.2.4/lib/ruby/2.2.0/x86_64-linux/stringio.so 7fc349aa8000-7fc349aa9000 r--p 00007000 08:01 3413245 /usr/local/rvm/rubies/ruby-2.2.4/lib/ruby/2.2.0/x86_64-linux/stringio.so 7fc349aa9000-7fc349aaa000 rw-p 00008000 08:01 3413245 /usr/local/rvm/rubies/ruby-2.2.4/lib/ruby/2.2.0/x86_64-linux/stringio.so 7fc349aaa000-7fc349aad000 r-xp 00000000 08:01 3413248 /usr/local/rvm/rubies/ruby-2.2.4/lib/ruby/2.2.0/x86_64-linux/thread.so 7fc349aad000-7fc349cad000 ---p 00003000 08:01 3413248 /usr/local/rvm/rubies/ruby-2.2.4/lib/ruby/2.2.0/x86_64-linux/thread.so 7fc349cad000-7fc349cae000 r--p 00003000 08:01 3413248 /usr/local/rvm/rubies/ruby-2.2.4/lib/ruby/2.2.0/x86_64-linux/thread.so 7fc349cae000-7fc349caf000 rw-p 00004000 08:01 3413248 /usr/local/rvm/rubies/ruby-2.2.4/lib/ruby/2.2.0/x86_64-linux/thread.so 7fc349caf000-7fc349cb1000 r-xp 00000000 08:01 3413205 /usr/local/rvm/rubies/ruby-2.2.4/lib/ruby/2.2.0/x86_64-linux/enc/trans/transdb.so 7fc349cb1000-7fc349eb1000 ---p 00002000 08:01 3413205 /usr/local/rvm/rubies/ruby-2.2.4/lib/ruby/2.2.0/x86_64-linux/enc/trans/transdb.so 7fc349eb1000-7fc349eb2000 r--p 00002000 08:01 3413205 /usr/local/rvm/rubies/ruby-2.2.4/lib/ruby/2.2.0/x86_64-linux/enc/trans/transdb.so 7fc349eb2000-7fc349eb3000 rw-p 00003000 08:01 3413205 /usr/local/rvm/rubies/ruby-2.2.4/lib/ruby/2.2.0/x86_64-linux/enc/trans/transdb.so 7fc349eb3000-7fc349eb5000 r-xp 00000000 08:01 3413163 /usr/local/rvm/rubies/ruby-2.2.4/lib/ruby/2.2.0/x86_64-linux/enc/encdb.so 7fc349eb5000-7fc34a0b4000 ---p 00002000 08:01 3413163 /usr/local/rvm/rubies/ruby-2.2.4/lib/ruby/2.2.0/x86_64-linux/enc/encdb.so 7fc34a0b4000-7fc34a0b5000 r--p 00001000 08:01 3413163 /usr/local/rvm/rubies/ruby-2.2.4/lib/ruby/2.2.0/x86_64-linux/enc/encdb.so 7fc34a0b5000-7fc34a0b6000 rw-p 00002000 08:01 3413163 /usr/local/rvm/rubies/ruby-2.2.4/lib/ruby/2.2.0/x86_64-linux/enc/encdb.so 7fc34a0b6000-7fc34a1be000 r-xp 00000000 08:01 2239161 /lib/x86_64-linux-gnu/libm-2.23.so 7fc34a1be000-7fc34a3bd000 ---p 00108000 08:01 2239161 /lib/x86_64-linux-gnu/libm-2.23.so 7fc34a3bd000-7fc34a3be000 r--p 00107000 08:01 2239161 /lib/x86_64-linux-gnu/libm-2.23.so 7fc34a3be000-7fc34a3bf000 rw-p 00108000 08:01 2239161 /lib/x86_64-linux-gnu/libm-2.23.so 7fc34a3bf000-7fc34a3c8000 r-xp 00000000 08:01 2239039 /lib/x86_64-linux-gnu/libcrypt-2.23.so 7fc34a3c8000-7fc34a5c7000 ---p 00009000 08:01 2239039 /lib/x86_64-linux-gnu/libcrypt-2.23.so 7fc34a5c7000-7fc34a5c8000 r--p 00008000 08:01 2239039 /lib/x86_64-linux-gnu/libcrypt-2.23.so 7fc34a5c8000-7fc34a5c9000 rw-p 00009000 08:01 2239039 /lib/x86_64-linux-gnu/libcrypt-2.23.so 7fc34a5c9000-7fc34a5f7000 rw-p 00000000 00:00 0 7fc34a5f7000-7fc34a5fa000 r-xp 00000000 08:01 2239044 /lib/x86_64-linux-gnu/libdl-2.23.so 7fc34a5fa000-7fc34a7f9000 ---p 00003000 08:01 2239044 /lib/x86_64-linux-gnu/libdl-2.23.so 7fc34a7f9000-7fc34a7fa000 r--p 00002000 08:01 2239044 /lib/x86_64-linux-gnu/libdl-2.23.so 7fc34a7fa000-7fc34a7fb000 rw-p 00003000 08:01 2239044 /lib/x86_64-linux-gnu/libdl-2.23.so 7fc34a7fb000-7fc34a87a000 r-xp 00000000 08:01 1586083 /usr/lib/x86_64-linux-gnu/libgmp.so.10.3.0 7fc34a87a000-7fc34aa79000 ---p 0007f000 08:01 1586083 /usr/lib/x86_64-linux-gnu/libgmp.so.10.3.0 7fc34aa79000-7fc34aa7a000 r--p 0007e000 08:01 1586083 /usr/lib/x86_64-linux-gnu/libgmp.so.10.3.0 7fc34aa7a000-7fc34aa7b000 rw-p 0007f000 08:01 1586083 /usr/lib/x86_64-linux-gnu/libgmp.so.10.3.0 7fc34aa7b000-7fc34aa93000 r-xp 00000000 08:01 2239198 /lib/x86_64-linux-gnu/libpthread-2.23.so 7fc34aa93000-7fc34ac92000 ---p 00018000 08:01 2239198 /lib/x86_64-linux-gnu/libpthread-2.23.so 7fc34ac92000-7fc34ac93000 r--p 00017000 08:01 2239198 /lib/x86_64-linux-gnu/libpthread-2.23.so 7fc34ac93000-7fc34ac94000 rw-p 00018000 08:01 2239198 /lib/x86_64-linux-gnu/libpthread-2.23.so 7fc34ac94000-7fc34ac98000 rw-p 00000000 00:00 0 7fc34ac98000-7fc34ae58000 r-xp 00000000 08:01 2239031 /lib/x86_64-linux-gnu/libc-2.23.so 7fc34ae58000-7fc34b057000 ---p 001c0000 08:01 2239031 /lib/x86_64-linux-gnu/libc-2.23.so 7fc34b057000-7fc34b05b000 r--p 001bf000 08:01 2239031 /lib/x86_64-linux-gnu/libc-2.23.so 7fc34b05b000-7fc34b05d000 rw-p 001c3000 08:01 2239031 /lib/x86_64-linux-gnu/libc-2.23.so 7fc34b05d000-7fc34b061000 rw-p 00000000 00:00 0 7fc34b061000-7fc34b31a000 r-xp 00000000 08:01 3412286 /usr/local/rvm/rubies/ruby-2.2.4/lib/libruby.so.2.2.0 7fc34b31a000-7fc34b51a000 ---p 002b9000 08:01 3412286 /usr/local/rvm/rubies/ruby-2.2.4/lib/libruby.so.2.2.0 7fc34b51a000-7fc34b51f000 r--p 002b9000 08:01 3412286 /usr/local/rvm/rubies/ruby-2.2.4/lib/libruby.so.2.2.0 7fc34b51f000-7fc34b522000 rw-p 002be000 08:01 3412286 /usr/local/rvm/rubies/ruby-2.2.4/lib/libruby.so.2.2.0 7fc34b522000-7fc34b533000 rw-p 00000000 00:00 0 7fc34b533000-7fc34b559000 r-xp 00000000 08:01 2239011 /lib/x86_64-linux-gnu/ld-2.23.so 7fc34b625000-7fc34b648000 r--s 00000000 08:01 3412249 /usr/local/rvm/rubies/ruby-2.2.4/bin/ruby 7fc34b648000-7fc34b74e000 rw-p 00000000 00:00 0 7fc34b752000-7fc34b753000 ---p 00000000 00:00 0 7fc34b753000-7fc34b758000 rw-p 00000000 00:00 0 7fc34b758000-7fc34b759000 r--p 00025000 08:01 2239011 /lib/x86_64-linux-gnu/ld-2.23.so 7fc34b759000-7fc34b75a000 rw-p 00026000 08:01 2239011 /lib/x86_64-linux-gnu/ld-2.23.so 7fc34b75a000-7fc34b75b000 rw-p 00000000 00:00 0 7ffc75b9a000-7ffc76399000 rw-p 00000000 00:00 0 [stack] 7ffc763af000-7ffc763b1000 r--p 00000000 00:00 0 [vvar] 7ffc763b1000-7ffc763b3000 r-xp 00000000 00:00 0 [vdso] ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]

    [NOTE] You may have encountered a bug in the Ruby interpreter or extension libraries. Bug reports are welcome. For details: http://www.ruby-lang.org/bugreport.html

    Aborted root@c8f53aedb9b3:/repos/tensorflow.rb/image#`

    opened by sandeepnagra 0
  • Got memory leak error when I use Tensorflow::Tensor.new(array, :float)

    Got memory leak error when I use Tensorflow::Tensor.new(array, :float)

    When I build an complex tensor using the Tensorflow::Tensor.new(array, :float), I got a memory leak error(seems only happened on a big array). It maybe an memory malloc issue. When I change the data_size of Tensorflow::TF_FLOAT to 4(original value is 8) and the issue will be fixed. Is this a bug or it depends on my local C++ compiler or my usage issue? Here is the code: https://github.com/somaticio/tensorflow.rb/blob/master/lib/tensorflow/tensor.rb#L76

    opened by BAI-Bonjwa 0
  • got extconf.rb failed - when ran

    got extconf.rb failed - when ran "ruby extconf.rb"

    Hi All,

    I got the error message below when trying to install tensorflow.rb(1st step):

    tensorflow_c git:(master) ✗ ruby extconf.rb                                
    *** extconf.rb failed ***
    Could not create Makefile due to some reason, probably lack of necessary
    libraries and/or headers.  Check the mkmf.log file for more details.  You may
    need configuration options.
    
    Provided configuration options:
    	--with-opt-dir
    	--without-opt-dir
    	--with-opt-include
    	--without-opt-include=${opt-dir}/include
    	--with-opt-lib
    	--without-opt-lib=${opt-dir}/lib
    	--with-make-prog
    	--without-make-prog
    	--srcdir=.
    	--curdir
    	--ruby=/Users/esu/.rbenv/versions/2.3.0/bin/$(RUBY_BASE_NAME)
    

    I couldnt find mkmf.log in tensorflow_c folder

    ➜  tensorflow_c git:(master) ✗ ll
    total 24
    -rw-r--r--  1 esu  staff   949B Oct  1 22:38 Tensorflow.i
    -rw-r--r--  1 esu  staff   1.4K Oct  1 22:38 converter.py
    -rw-r--r--  1 esu  staff   188B Oct  1 22:38 extconf.rb
    drwxr-xr-x  6 esu  staff   204B Oct  1 22:38 files
    

    kindly please advise

    opened by estelleccl 3
  • TF_TensorDelete is never called, so there's a memory leak whenever tensors are built.

    TF_TensorDelete is never called, so there's a memory leak whenever tensors are built.

    Using the gem get_process_mem, I noticed that the memory usage by my process was increasing dramatically if I tried to do a large number of predictions (where each prediction creates an input tensor, and calls session.run)

    I've tracked this down to line 59 of tensor.rb, which calls the TF_NewTensor_wrapper function. Looking at this, I noticed that in the tensorflow API documentation, it mentions that you must call TF_DeleteTensor whenever you call TF_NewTensor, and then pass in a deallocator function that will clean up any further data after the tensor is deleted. This appears to never occur, so although ruby is deallocating the tensor objects in ruby, the C++ memory is never freed as tensors are not deleted and the memory thats allocated in TF_NewTensor_wrapper is also never freed.

    It seems like we need some sort of destructor in tensor.rb that then will call a TF_DeleteTensor_wrapper function that calls TF_DeleteTensor. In addition you'll need to pass in a deallocator function that calls free(data) when you create the tensors. I've experimented with this, but I'm not sure how to do this as ruby doesn't have an easy way to destruct objects.

    opened by AshtonO 1
  • FFI backend

    FFI backend

    This is for #89.

    I have taken the approach of simply swapping the FFI bindings in for the ext bindings and replacing any C wrappers around the TensorFlow API with Ruby+FFI versions of the same code.

    So far things are working ok, but I'm stuck with a segfault (0x00 mem access) that I can't figure out. A call to TF_SetAttrTensor with a tensor created by the wrapper String_encoder method seems to be improperly initialized, later blowing up somewhere near Status::SlowCopyFrom in TensorFlow itself via a 0x0 pointer access.

    There's also a small tweak to the generated code to modify the TF_StringEncode binding to have an out parameter for the destination. This will need some tweaks to ffi_gen to avoid, and there are likely other cases.

    The segv I get is here...maybe someone will be able to help: https://gist.github.com/headius/752eb916bd3a9d39f2574a5a5f06d1f5

    Obviously a lot more work to do here but I'm pleased with how far I got.

    opened by headius 5
Owner
somatic labs
machine learning consulting by Jason Toy
somatic labs
An image base contains 490 images for learning (400 cars and 90 boats), and another 21 images for testingAn image base contains 490 images for learning (400 cars and 90 boats), and another 21 images for testing

SVM Données Une base d’images contient 490 images pour l’apprentissage (400 voitures et 90 bateaux), et encore 21 images pour fait des tests. Prétrait

Achraf Rahouti 3 Nov 30, 2021
Deploy tensorflow graphs for fast evaluation and export to tensorflow-less environments running numpy.

Deploy tensorflow graphs for fast evaluation and export to tensorflow-less environments running numpy. Now with tensorflow 1.0 support. Evaluation usa

Marcel R. 349 Aug 6, 2022
TensorFlow Ranking is a library for Learning-to-Rank (LTR) techniques on the TensorFlow platform

TensorFlow Ranking is a library for Learning-to-Rank (LTR) techniques on the TensorFlow platform

null 2.6k Jan 4, 2023
Robust Video Matting in PyTorch, TensorFlow, TensorFlow.js, ONNX, CoreML!

Robust Video Matting in PyTorch, TensorFlow, TensorFlow.js, ONNX, CoreML!

Peter Lin 6.5k Jan 4, 2023
Robust Video Matting in PyTorch, TensorFlow, TensorFlow.js, ONNX, CoreML!

Robust Video Matting (RVM) English | 中文 Official repository for the paper Robust High-Resolution Video Matting with Temporal Guidance. RVM is specific

flow-dev 2 Aug 21, 2022
This repository contains the code used for Predicting Patient Outcomes with Graph Representation Learning (https://arxiv.org/abs/2101.03940).

Predicting Patient Outcomes with Graph Representation Learning This repository contains the code used for Predicting Patient Outcomes with Graph Repre

Emma Rocheteau 76 Dec 22, 2022
This repository contains a pytorch implementation of "StereoPIFu: Depth Aware Clothed Human Digitization via Stereo Vision".

StereoPIFu: Depth Aware Clothed Human Digitization via Stereo Vision | Project Page | Paper | This repository contains a pytorch implementation of "St

null 87 Dec 9, 2022
This repository contains PyTorch code for Robust Vision Transformers.

This repository contains PyTorch code for Robust Vision Transformers.

null 117 Dec 7, 2022
This repository contains the implementations related to the experiments of a set of publicly available datasets that are used in the time series forecasting research space.

TSForecasting This repository contains the implementations related to the experiments of a set of publicly available datasets that are used in the tim

Rakshitha Godahewa 80 Dec 30, 2022
This repository contains the code for our fast polygonal building extraction from overhead images pipeline.

Polygonal Building Segmentation by Frame Field Learning We add a frame field output to an image segmentation neural network to improve segmentation qu

Nicolas Girard 186 Jan 4, 2023
This repository contains the code for the paper "Hierarchical Motion Understanding via Motion Programs"

Hierarchical Motion Understanding via Motion Programs (CVPR 2021) This repository contains the official implementation of: Hierarchical Motion Underst

Sumith Kulal 40 Dec 5, 2022
This repository contains a PyTorch implementation of "AD-NeRF: Audio Driven Neural Radiance Fields for Talking Head Synthesis".

AD-NeRF: Audio Driven Neural Radiance Fields for Talking Head Synthesis | Project Page | Paper | PyTorch implementation for the paper "AD-NeRF: Audio

null 551 Dec 29, 2022
This repository contains all the code and materials distributed in the 2021 Q-Programming Summer of Qode.

Q-Programming Summer of Qode This repository contains all the code and materials distributed in the Q-Programming Summer of Qode. If you want to creat

Sammarth Kumar 11 Jun 11, 2021
null 190 Jan 3, 2023
This repository contains the implementation of Deep Detail Enhancment for Any Garment proposed in Eurographics 2021

Deep-Detail-Enhancement-for-Any-Garment Introduction This repository contains the implementation of Deep Detail Enhancment for Any Garment proposed in

null 40 Dec 13, 2022
This repository contains the source code and data for reproducing results of Deep Continuous Clustering paper

Deep Continuous Clustering Introduction This is a Pytorch implementation of the DCC algorithms presented in the following paper (paper): Sohil Atul Sh

Sohil Shah 197 Nov 29, 2022
This repository contains a re-implementation of the code for the CVPR 2021 paper "Omnimatte: Associating Objects and Their Effects in Video."

Omnimatte in PyTorch This repository contains a re-implementation of the code for the CVPR 2021 paper "Omnimatte: Associating Objects and Their Effect

Erika Lu 728 Dec 28, 2022
This repository contains the source code for the paper "DONeRF: Towards Real-Time Rendering of Compact Neural Radiance Fields using Depth Oracle Networks",

DONeRF: Towards Real-Time Rendering of Compact Neural Radiance Fields using Depth Oracle Networks Project Page | Video | Presentation | Paper | Data L

Facebook Research 281 Dec 22, 2022
This repository contains the code for using the H3DS dataset introduced in H3D-Net: Few-Shot High-Fidelity 3D Head Reconstruction

H3DS Dataset This repository contains the code for using the H3DS dataset introduced in H3D-Net: Few-Shot High-Fidelity 3D Head Reconstruction Access

Crisalix 72 Dec 10, 2022