【发布时间】:2016-08-31 17:01:13
【问题描述】:
我们正在构建一个 iOS 应用来使用 TensorFlow 库执行图像分类。
使用我们的机器学习模型(91MB,400 个类)和 TensorFlow“简单”示例,我们在任何具有 1GB RAM 的 iOS 设备上都会收到内存警告。 2GB 模型不会出现任何警告,而
我们正在使用来自 master 分支的最新 TensorFlow 代码,其中包括 this iOS memory performance commit,我们认为这可能会有所帮助,但没有。
我们还尝试在 TF 会话对象上设置各种 GPU 选项,包括 set_allow_growth(true) 和 set_per_process_gpu_memory_fraction()。
我们对 TF“简单”示例代码的唯一更改是 wanted_width 和 wanted_height 为 299,input_mean 和 input_std 为 128。
还有其他人遇到过这种情况吗?我们的模型是不是太大了?
【问题讨论】:
标签: ios memory machine-learning tensorflow