models icon indicating copy to clipboard operation
models copied to clipboard

读取数据除了问题

Open Fighter-zzp opened this issue 4 years ago • 4 comments

我是用自定义数据的,但是我的标签从来就没有float类型,但是它在训练两轮后缺报了Error: D:/1.7.1/paddle\paddle/fluid/operators/cross_entropy_op.h:173 Assertion label >= 0 && label < feature_size_ failed. Variable value (label) of OP(fluid.layers.cross_entropy) expected >= 0 and < 5335, but got 0. Please check label value.这是为什么呀?麻烦您帮帮我解决一下

Fighter-zzp avatar Apr 13 '20 11:04 Fighter-zzp

这个是度量学习源码的问题,麻烦抽空帮忙解决一下,歇息

Fighter-zzp avatar Apr 13 '20 11:04 Fighter-zzp

能否提供一个可复现这个问题的代码和数据,从上面打印的信息来看,数据label是0,应该是满足

0 <= label < feature_size_

的要求的。

SunGaofeng avatar Apr 14 '20 07:04 SunGaofeng

代码就是https://github.com/PaddlePaddle/models/tree/develop/PaddleCV/metric_learning,这个我没改过,数据集和那个斯坦福的差不多,我把时候label减少到5000就没发生那个问题了,但是在训练10000轮后出现MemoryError:Unable to allocate 4.31GiB for an array with shape (24059,24059) and data type float64的问题,这个要怎么解决比较好

Fighter-zzp avatar Apr 14 '20 08:04 Fighter-zzp

Can you provide a code and data that can reappear the problem? From the information printed above, the data label is 0, which should be satisfied.

0 <= label < feature_size_

Required. The code isHTTPSE//GITHUBCOM/PADLDLADDLE/MODES/Tee/Dealp/PADELCV/MeMICCL学习 I didn't change it. The data set was almost the same as that of Standford. When I cut the label to 5000, it didn't happen, but it appeared after the 10000 round of training.内存错误:无法为具有形状(2405924059)和数据类型FLUAT64的数组分配4.31 GIB The question of how to solve this problem is better.

Fighter-zzp avatar Apr 18 '20 08:04 Fighter-zzp