The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

weiju (9) [Avatar] Offline
#1
Hi,

I am currently trying to work through the sound examples in chapter 5 that are using Bregman Toolkit and I experienced a variety of different problems. First, this library does not support Python 3 so I tried this out with Python 2 yet I still seemingly had to patch the toolkit code.

Still I could not get the example to run with Tensorflow 1.0. Does there happen to be anyone to get listings 5.2-5.4 working with Tensorflow 1.0 ?

Edit:

Just wanted to add that in the SOM example tf.pack() needs to be replaced with tf.stack()

Thanks !
Nishant Shukla (52) [Avatar] Offline
#2
Thanks!
The latest MEAP should have instructions on setting up the Bregman Toolkit with Python 2. The "stack"/"pack" issue is also resolved in the latest update.
York (4) [Avatar] Offline
#3

Solution tested with macOS High Sierra, Version 10.13.6


Step 1: With Python 2.7.15 installed:

From the unzipped folder 'bregman_r12-09.15' copy the subfolder 'bregman'

into the folder 'site-packages', located at:

/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages


Step 2:

Make sure you have installed the right versions of numpy and tensorflow:

From Terminal give these commands:

pip2 install numpy==1.11.3

pip2 install tensorflow==1.0

Also needed is:

pip2 install matplotlib scipy Pillow


Step 3: From the TensorFlow-Book-master:

Concept01_clustering.ipynb should run without any modification.