caicloud / tensorflow-tutorial

Example TensorFlow codes and Caicloud TensorFlow as a Service dev environment.
2.93k stars 2.08k forks source link

6.5.2的tensorflow实现迁移学习出现代码问题,该怎么解决。 #78

Closed zhihao-chen closed 5 years ago

zhihao-chen commented 6 years ago

第六章6.5.2的tensorflow实现迁移学习出现了一个代码问题:empty range for randrange()。问题出在执行get_random_cached_bottlenecks函数里的label_index = random.randrange(n_classes)。我的代码完全是跟书上一样的。不知道怎么回事。

Watminf commented 6 years ago

函数creat_image_lists中,把file_glob = os.path.join(INPUT_DATA,dir_name,'.'+extension)改成file_glob = os.path.join(sub_dir, '.' + extension)

1056861744 commented 6 years ago

我也出现了相同的问题,按照你的修改,问题并没有解决。坐等回答

1056861744 commented 6 years ago

解决了,是路径出现问题,最后结尾加上‘/ ’

understand94 commented 6 years ago

你好请问一下,在转换数据的过程中,processed_data会变得很大,导致内存溢出,不知道该如何解决?我的内存是8G。

caicloud-bot commented 5 years ago

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close.

Prevent issues from auto-closing with an /lifecycle frozen comment.

If this issue is safe to close now please do so with /close.

/lifecycle stale

kjdnl commented 5 years ago

求解惑,在第二版的第6章的迁移学习代码(162~164)页,那个数据处理的程序有问题,在将原始的RGB图片整理成模型需要的输入数据格式npy的时候。随着运行时间的增加,处理速度越来越慢,最终造成内存不够。 跑程序一直报memeory error,请问怎么纠错?求解惑?您能发我下正确的代码吗? 我邮箱406803818@qq.com

caicloud-bot commented 5 years ago

Stale issues rot after 30d of inactivity. Mark the issue as fresh with /remove-lifecycle rotten. Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

/lifecycle rotten /remove-lifecycle stale

caicloud-bot commented 5 years ago

Rotten issues close after 30d of inactivity. Reopen the issue with /reopen. Mark the issue as fresh with /remove-lifecycle rotten.

/close