Comments (7)
FYI.
cd sonnet/tensorflow
git checkout r1.2
./configure
bazel build --config=opt //tensorflow/tools/pip_package:build_pip_package
bazel-bin/tensorflow/tools/pip_package/build_pip_package /tmp/tensorflow_pkg
pip uninstall tensorflow
pip install /tmp/tensorflow_pkg/tensorflow-1.2.0-cp36-cp36m-macosx_10_7_x86_64.whl
cd ../
bazel build --config=opt //:install
bazel-bin/install /tmp/sonnet_pkg
pip uninstall sonnet
pip install /tmp/sonnet_pkg/sonnet-1.2-py3-none-any.whl
from sonnet.
Thank you, Shuolongbj. Fortuneately, your post revealed one slight mishap, and I remembered another. My only errors were I did not checkout r1.2 in tensorflow (I instead checked out master), and when I did the configure files for bazel in Tensorflow, I realize I called the opt flags as command line arguments, rather than specify them in the configure file of tensorflow. This potentially desynchronized the Tensorflow and Sonnet configurations and probably resulted in the error. I can confirm that sonnet 1.2 installs successfully on mac with Tensorflow 1.2.0.
I added these flags as they are when the tensorflow configure file asks for optimizatoin flags to optimize my build for my mac (this is for my personal machine, these flags may no apply specifically to your machine. Note the syntax though '-m[flag]'):
-mavx -mavx2 -mfma -msse4.2
from sonnet.
Compiling against newer headers solves the problem though the same issue occurs when TF is outdated (i.e., < 1.2.0).
from sonnet.
@alshedivat we've pushed a new version with the tensorflow submodule updated, can you try again?
from sonnet.
@malcolmreynolds Thanks, it works now with TF 1.2.0, but seems to be backwards incompatible (as mentioned in the comment above). If I use TF < 1.2.0, I get the following error:
$ python
Python 3.5.2 (default, Jun 6 2017, 00:26:23)
[GCC 4.2.1 Compatible Apple LLVM 8.1.0 (clang-802.0.42)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sonnet
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/maruan/.pyenv/versions/venv3.5/lib/python3.5/site-packages/sonnet/__init__.py", line 111, in <module>
from sonnet.python.ops.resampler import resampler
File "/Users/maruan/.pyenv/versions/venv3.5/lib/python3.5/site-packages/sonnet/python/ops/resampler.py", line 33, in <module>
tf.resource_loader.get_path_to_datafile("_resampler.so"))
File "/Users/maruan/.pyenv/versions/venv3.5/lib/python3.5/site-packages/tensorflow/python/framework/load_library.py", line 64, in load_op_library
None, None, error_msg, error_code)
tensorflow.python.framework.errors_impl.NotFoundError: dlopen(/Users/maruan/.pyenv/versions/venv3.5/lib/python3.5/site-packages/sonnet/python/ops/_resampler.so, 6): Symbol not found: __ZN10tensorflow15shape_inference16InferenceContext15WithRankAtLeastENS0_11ShapeHandleExPS2_
Referenced from: /Users/maruan/.pyenv/versions/venv3.5/lib/python3.5/site-packages/sonnet/python/ops/_resampler.so
Expected in: flat namespace
in /Users/maruan/.pyenv/versions/venv3.5/lib/python3.5/site-packages/sonnet/python/ops/_resampler.so
I am not sure if there is an easy workaround, but you may want to mention in the readme that the current version supports only the latest TF release and update setup.py
. Hope this helps.
from sonnet.
I get the same error as alshedivat's latest post, but for the latest version of sonnet with latest version of tensorflow installed. I am on Mac OSX 10.12.5. I reinstalled tensorflow from sonnet's recursive git repository of tensorflow (1.2) and it works fine. I then installed sonnet as described in README, but this is what I get. I am outside of install directory. This is with most recent sonnet and sonnet's tensorflow, I did this last night. I'd love to get this working. Should this be a separate issue, or should we try to recreate these errors on more systems for a better consensus?
>>> import sonnet as snt
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/dsp/virtualenv/tf/lib/python2.7/site-packages/sonnet/__init__.py", line 111, in <module>
from sonnet.python.ops.resampler import resampler
File "/Users/dsp/virtualenv/tf/lib/python2.7/site-packages/sonnet/python/ops/resampler.py", line 33, in <module>
tf.resource_loader.get_path_to_datafile("_resampler.so"))
File "/Users/dsp/virtualenv/tf/lib/python2.7/site-packages/tensorflow/python/framework/load_library.py", line 64, in load_op_library
None, None, error_msg, error_code)
tensorflow.python.framework.errors_impl.NotFoundError: dlopen(/Users/dsp/virtualenv/tf/lib/python2.7/site-packages/sonnet/python/ops/_resampler.so, 6): Symbol not found: __ZN10tensorflow14TensorShapeRep12SlowCopyFromERKS0_
Referenced from: /Users/dsp/virtualenv/tf/lib/python2.7/site-packages/sonnet/python/ops/_resampler.so
Expected in: flat namespace
in /Users/dsp/virtualenv/tf/lib/python2.7/site-packages/sonnet/python/ops/_resampler.so
from sonnet.
Closing this issue as everyone in the thread seems to have the situation resolved. Please reopen if necessary.
from sonnet.
Related Issues (20)
- Conv2D initialize error in tf function
- Typo HOT 1
- this portion of attention code looks incorrect
- Cannot install sonnet on mac m1 HOT 5
- Decaying learning rate HOT 1
- Can you explain the logic of updated_ema_cluster_size in VectorQuantizerEMA?
- Convert a Sonnet model to a Keras model HOT 1
- (Maybe) in-consistency between VQ-VAE paper and its implementation. HOT 2
- Regarding LearningRateSchedule for ADAM optimizer HOT 2
- Learning rate and optimizer used for the VQ-VAE-2 paper HOT 2
- I have a question about the perplexity term (in the VQ-VAE). HOT 2
- Issues using Sonnet HOT 3
- How to save the checkpoint for self-defined model?
- TensorArray Not Used on line 71 of sgd_test.py HOT 2
- Is there a stereotypical way to visualize the network strucuture when using Sonnet? HOT 1
- sonnet abstract module in tensorflow2 HOT 10
- Laplace smoothing for EMA codebook update
- Basic import fails on Colab: cannot import name 'context' from 'tensorflow.python' HOT 11
- AttributeError: module 'nest' has no attribute 'Create' HOT 1
- Load pretrained sonnet model back
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sonnet.