I am not able to use input_data.py to download the MNIST dataset. When I try to call the method, I see some html and the following error:
='#179'"></td><td class="FileContents-lineContents"><a name="179"></a></td></tr><tr class="u-pre u-monospace FileContents-line"><td class="u-lineNum u-noSelect FileContents-lineNum" data-line-number="180" onclick="window.location.hash='#180'"></td><td class="FileContents-lineContents"><a name="180"></a><span class="pln"> </span><span class="kwd">return</span><span class="pln"> data_sets</span></td></tr></table></div> <!-- Container --></div> <!-- Site-content --><footer class="Site-footer"><div class="Footer"><span class="Footer-poweredBy">Powered by <a href="https://code.google.com/p/gitiles/">Gitiles</a></span><span class="Footer-formats"><a class="u-monospace Footer-formatsItem" href="?format=TEXT">txt</a> <a class="u-monospace Footer-formatsItem" href="?format=JSON">json</a></span></div></footer></body></html>
^
SyntaxError: invalid syntax
Not sure what I am doing wrong. The code I have is:
import input_data
mnist = input_data.read_data_sets("MNIST_data/", one_hot=True)
The syntax error is raised because input_data.py
is in HTML format — notice the HTML tags in the error message — presumably because you downloaded the webpage that displays the content of the file from GitHub.
Instead, download the raw contents of input_data.py
from this link to get a valid Python file: https://raw.githubusercontent.com/tensorflow/tensorflow/master/tensorflow/g3doc/tutorials/mnist/input_data.py
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments