Python File Handling for Deep Learning (1.4)
[ad_1]
Reading files with Python is a critical skill for Keras and TensorFlow. This video introduces file handling for txt, csv, PNG, JPEG, and other files with the Python programming language for use with deep learning, Keras and TensorFlow.
Code for This Video:
https://github.com/jeffheaton/t81_558_deep_learning/blob/master/t81_558_class_01_4_python_files.ipynb
Course Homepage: https://sites.wustl.edu/jeffheaton/t81-558/
Follow Me/Subscribe:
https://www.youtube.com/user/HeatonResearch
https://github.com/jeffheaton
https://twitter.com/jeffheaton
Support Me on Patreon: https://www.patreon.com/jeffheaton
Source
[ad_2]
Hi, I ran the code for importing the text file (the constitution one) and I get a long list of errors
The first one is:
ConnectionResetError Traceback (most recent call last)
/usr/lib/python3.6/urllib/request.py in do_open(self, http_class, req, **http_conn_args)
1324 h.request(req.get_method(), req.selector, req.data, headers,
-> 1325 encode_chunked=req.has_header('Transfer-encoding'))
1326 except OSError as err: # timeout error
I (think?) it's having trouble accessing the text file for some reason but I'm not sure.
Thanks again for another helpful video!
Great tutorial on deep learning!
For reading the USA Declaration of Independence as a text file, I get an error message:
HTTPError Traceback (most recent call last)
<ipython-input-22-3f46333a1774> in <module>()
2
3 url = "https://www.constitution.org/usdeclar.txt"
—-> 4 with urllib.request.urlopen(url) as urlstream:
5 for line in codecs.iterdecode(urlstream, 'utf-8'):
6 print(line.rstrip())
5 frames
/usr/lib/python3.6/urllib/request.py in http_error_default(self, req, fp, code, msg, hdrs)
648 class HTTPDefaultErrorHandler(BaseHandler):
649 def http_error_default(self, req, fp, code, msg, hdrs):
–> 650 raise HTTPError(req.full_url, code, msg, hdrs, fp)
651
652 class HTTPRedirectHandler(BaseHandler):
HTTPError: HTTP Error 403: Forbidden
How to solve?
Thanks Mr Jeff and you are really best my teacher
Thank You Sir, You are the best!!
Thanks, I am loving your videos.
Hello Jeff. Thanks for these, I have a question. How can i easily solve the error below?
ModuleNotFoundError: No module named 'CSV'
Thanks Jeff , best video for any level , short and without any over do .
I found while reading from a windows file path, you will need to include an "r" before the string. df = pd.read_csv(r"c:datamyfile.csv")
I thought you would discuss audio files, video files and image files. Coming up in part 2?
Hi Jeff. Thanks for the video. Just curious, this video is for `File Handling`, but nothing to do with Deep Learning, right?
Thanks, these are really neat and very helpful. You explain wonderfully. ✌
What about audio files?
Hi Jeff, I'm trying to learn deep learning. Can you guild me on where I should start first and which languages I should know?
Thanks,!