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]

Comment List

  • Jeff Heaton
    December 3, 2020

    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!

  • Jeff Heaton
    December 3, 2020

    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&quot;

    —-> 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?

  • Jeff Heaton
    December 3, 2020

    Thanks Mr Jeff and you are really best my teacher

  • Jeff Heaton
    December 3, 2020

    Thank You Sir, You are the best!!

  • Jeff Heaton
    December 3, 2020

    Thanks, I am loving your videos.

  • Jeff Heaton
    December 3, 2020

    Hello Jeff. Thanks for these, I have a question. How can i easily solve the error below?
    ModuleNotFoundError: No module named 'CSV'

  • Jeff Heaton
    December 3, 2020

    Thanks Jeff , best video for any level , short and without any over do .

  • Jeff Heaton
    December 3, 2020

    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")

  • Jeff Heaton
    December 3, 2020

    I thought you would discuss audio files, video files and image files. Coming up in part 2?

  • Jeff Heaton
    December 3, 2020

    Hi Jeff. Thanks for the video. Just curious, this video is for `File Handling`, but nothing to do with Deep Learning, right?

  • Jeff Heaton
    December 3, 2020

    Thanks, these are really neat and very helpful. You explain wonderfully. ✌

  • Jeff Heaton
    December 3, 2020

    What about audio files?

  • Jeff Heaton
    December 3, 2020

    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?

  • Jeff Heaton
    December 3, 2020

    Thanks,!

Write a comment