Closed arturovivas closed 7 years ago
Hi @arturovivas - thanks for opening this up. We actually have a GitHub repo dedicated to the book, located here:
https://github.com/backstopmedia/tensorflowbook
There, you can find complete, functioning code for chapter 6. Some of the issues you encountered are due to using Python 2.7 instead of Python 3.4 (we're working on providing cross-functionality).
Would you mind opening up this issue on the book's repository and copy/paste the error you see when you run the code? That would help with debugging.
Sure no problem. I just did it. See you there.
Hi @samjabrahams
Firstly, I wasn't sure where to open this issue, since it's not directly related to one of your repositories, but to your book TensorFlow for Machine Learning. I just started this week with it and I have to say, it's a great big tutorial :).
The issue is regarding one of the examples. Ch. 6. Word Vector Embeddings. I was trying to run the code which is spread across several pages and I realized that it won't really run. Mainly because the Wikipedia links are not anymore available (up to date), yet also because of some minor code errors (In my opinion). Like
bz2.open()'
which I had to replace withbz2.BZ2File()
for example, orfrom urllib.request import urlopen
withfrom urllib import urlopen
. So I changed all this, though I am now stuck in the_read_pages(self, url)
method. I copied your code with my amends to my github so you could take a look. https://github.com/arturovivas/temp_tf/blob/master/Recurrent_Neural_Networks_2.ipynb.Could you please help me out? Maybe I just don't fully understand the
etree.iterparse()
mechanism.Thanks a lot! Cheers Arturo