简体   繁体   English

当我在Jetson tx1中尝试加载卷积预训练模型时,杀死了张量流中的错误

[英]killed error in tensorflow when I try load convolutional pretrained model in jetson tx1

I have a face recognition model trained on a inception_resnet Model. 我有一个在inception_resnet模型上训练过的人脸识别模型。

When I run my tensorflow code to load trained model on Nvidia Jetson TX1 , it just outputs "killed". 当我运行tensorflow代码以在Nvidia Jetson TX1上加载经过训练的模型时,它只会输出“ killed”。 How do I debug this? 我该如何调试?

What can I do? 我能做什么? I think it's because memory problem! 我认为是因为内存问题!

According to this issue 'killed' on the jetson means it ran out of memory. 根据这个问题, “杰森”被“杀死”意味着它内存不足。 It may not be possible to run the inception_resnet model on the TX1. 在TX1上可能无法运行inception_resnet模型。

您可以尝试将batch_size的数字减小,例如从32减少到16,这将减少内存消耗并增加训练时间。

Finally I find the answer! 终于找到答案了!

If you don't set the maximum fraction of GPU memory, it allocates almost the whole free memory. 如果未设置GPU内存的最大部分,它将分配几乎全部可用内存。 My problem was lack of enough memory for GPU. 我的问题是GPU内存不足。

You can pass the session configuration. 您可以通过会话配置。

I set the per_process_gpu_memory_fraction configuration in tf.GPUOptions to 0.8 and the problem is solved. 我在tf.GPUOptions中将per_process_gpu_memory_fraction配置设置为0.8,问题已解决。

gpu_options = tf.GPUOptions(per_process_gpu_memory_fraction=0.8)
sess = tf.Session(config=tf.ConfigProto(gpu_options=gpu_options))

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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