octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Integrating Pytave and Nnet


From: Francesco Faccio
Subject: Re: Integrating Pytave and Nnet
Date: Thu, 27 Apr 2017 01:02:28 +0200

2017-04-16 11:15 GMT+02:00 enricobertino <address@hidden>:
In the last release of Tensorflow (1.0.1), the import of the swig-generated
library "_pywrap_tensorflow" was not stable. There was a fix one month ago
in [1], and now using the dev version (1.1.0-rc1), I have no import problems
anymore. I will try in a different machine too.

[1]
https://github.com/tensorflow/tensorflow/commit/718812c9e4df55b8b3275aa4db7bb6833ed03111


Hi Enrico,

I tried to import Tensorflow (1.1.0-rc2) through Pytave and I got this error (I'm using Ubuntu 16.04.2 LTS):

>> py.tensorflow.VERSION
error: pycall: AttributeError: 'module' object has no attribute 'argv'
error: called from
    subsref at line 52 column 7

so it seems that there is still some work to be done in order to fix it. Can you please try to test this with Tensorflow 1.1.0-rc2? Have you already tested it in a different machine?
I suggest you to take a closer look into sys.argv, and the issues pointed out by Mike.

I confirm that this fix the problem for me:
>> py.sys.__dict__.__setitem__ ("argv", {""});
>> py.tensorflow.VERSION

but if I try to import TensorFlow before setting argv, then even with this workaround I have an error message:

>> py.tensorflow.VERSION
error: pycall: AttributeError: 'module' object has no attribute 'argv'

error: called from
    subsref at line 52 column 7
>> py.sys.__dict__.__setitem__ ("argv", {""});
>> py.tensorflow.VERSION
error: pycall: ImportError: cannot import name pywrap_tensorflow

error: called from
    subsref at line 52 column 7



Thank you for the test case you wrote, I'm interested in mnist_2k2k since it imports data from Octave. 
I tested your code and everything seems to work well, but I think you are doing some unnecessary copies of the dataset. Can you please try to keep only one copy of the dataset once you import it in Octave?

Francesco

reply via email to

[Prev in Thread] Current Thread [Next in Thread]