简体   繁体   English

Python 神经网络 我如何改进我的代码,使其更快

[英]Python Neural Network How i can improve my code, to make it faster

I builded a U-Net NN to predict mask of the ship on the image, and I even cannot use this NN for 300 images (768x768).我构建了一个 U-Net NN 来预测图像上船舶的掩码,我什至无法将这个 NN 用于 300 张图像(768x768)。 So, what I need to change in my code, to make it faster and less resource-consuming Link to code: https://pastecode.io/s/7yfjawdi .所以,我需要在我的代码中进行更改,以使其更快、更省资源链接到代码: https://pastecode.io/s/7yfjawdi

You could run it on googlecolab ( https://colab.research.google.com/?utm_source=scs-index ).您可以在 googlecolab ( https://colab.research.google.com/?utm_source=scs-index ) 上运行它。 This would take care of the resource and for your first problem ( how to make it faster?) you could leverage their gpu/tpu which they provide on the colab environment itself.这将处理资源和您的第一个问题(如何使其更快?)您可以利用他们在 colab 环境本身上提供的 gpu/tpu。

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

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