简体   繁体   English

来自目录的 Keras 流标签张量

[英]Keras flow label tensors from directory

I am using convolutional neural networks to predict vegetation growth.我正在使用卷积神经网络来预测植被生长。 My input is a (n,51,51,1) terrain elevation tensor, and the label is a (n,51,51,1) vegetation tensor.我的输入是 (n,51,51,1) 地形高程张量,标签是 (n,51,51,1) 植被张量。

Since flow from directory uses foldernames as labels, this is a bit of a problem.由于来自目录的流使用文件夹名称作为标签,因此这有点问题。 My network is performing well, but having to have all the data in memory is a bit limiting.我的网络运行良好,但必须将所有数据保存在内存中有点限制。 If anyone knows how to setup a flow from directory for this problem I would appreciate it.如果有人知道如何为这个问题设置flow from directory我将不胜感激。 I'm using R as an interface to keras and tensorflow, but solutions in python are welcome too.我使用 R 作为 keras 和 tensorflow 的接口,但也欢迎使用 python 中的解决方案。 Included the picture in case it wasn't clear what I'm doing.包括图片,以防不清楚我在做什么。 Thanks!谢谢! 海拔到植被

This is a complex problem you are trying to solve.这是您要解决的复杂问题。 Image creation is another can of worms than classification (which is what you are talking about)图像创建是另一种蠕虫,而不是分类(这就是你所说的)

You can check this article that talks more in depth about the generational networks.您可以查看这篇文章,文章更深入地讨论了代际网络。

Another way to think about it, is to have the last output layer with 51*51 hidden units and do regression.另一种思考方式是让最后一个输出层具有 51*51 个隐藏单元并进行回归。 By this I mean to treat it as a regression problem where you do regression on each pixel individually.我的意思是将其视为回归问题,您可以单独对每个像素进行回归。

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

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