简体   繁体   中英

Access denied error while executing tensorflow example - https://www.tensorflow.org/tutorials/load_data/images

The link shows an example of data pipeline for images it works fine when I run directly on colab but when I use it on my laptop its gives this error. I've been using Keras for quite a while but this is the 1st time trying data pipelining and I couldn't find any answer for it.

This error occurs only when I run these 4 lines:-

image_batch, label_batch = next(iter(train_ds))
timeit(train_ds)
uncached_ds = prepare_for_training(labeled_ds, cache=False)
timeit(uncached_ds)
filecache_ds = prepare_for_training(labeled_ds, cache="./flowers.tfcache")
timeit(filecache_ds)

UnknownError: NewRandomAccessFile failed to Create/Open: D:\Deep Learning\Datasets\12 class dataset\motorbike: Access is denied. ; Input/output error [[{{node ReadFile}}]]

Sorry, my bad I used os and glob library to denote location and access the directory while executing the code in my laptop which produced this error but after using 'pathlib' itself, it works like a charm...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM