Papadoojha Papadoojha - 11 months ago 140
Python Question

How to clear dataset cache in keras?

I downloaded dataset about handwritten 10 digit via mnist but it stuck (not finished) so, when I run code again this error occur

BadZipFile: File is not a zip file
I think the answer in this post can help me but I don't know how to run this code rm "~/.keras/datasets/*". I got invalid syntax error when I run in spyder and in cmd.

Answer Source

"rm" is a Linux or MacOS command. For Windows, use "del".

You will need to find where keras datasets is under Windows. "~" is for the home directory under Linux or MacOS, but Windows could use %USERPROFILE% instead. Also, Windows uses "\" instead of "/" as the path delimiter, so the correct command for Windows could be -

"del %USERPROFILE%\.keras\datasets\*"

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download