This repository has been archived by the owner on Jun 11, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 101
datamanager.py #24
Comments
@Belval |
Can any of you give me his configuration and the format of your training samples? On my Ubuntu 18.04 machine with python 3 this does not cause any issues. |
我跟你改了,还是报这个错啊 |
我也遇到了这个问题。最后查出来是numpy.array()函数的原因。源码里是64个图片一组送进去的,但是特殊情况下如果64张图片的word标记的长度是一样的,numpy.array()的转换结果可能变成1维,进而引起这个错误。增加batch_size(我从64改到128)似乎可以解决这个问题,不过治标不治本。或者尝试进入sparse_tuple_from函数里,在utils.py第16行: |
你好,最后是怎么解决的呢? |
我的是输入数据一样长,所以将传入的sequences再做一次维度变换就好了(因为有时候sequences是一维的数据) |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
在def __generate_all_train_batches(self)里面,
batch_dt = sparse_tuple_from(
np.reshape(
np.array(raw_batch_la),
(-1)
)
)
这样会报错: int型没有len属性
改成
batch_dt = sparse_tuple_from(
np.array(raw_batch_la)
)
就能训练了,但训练非常非常慢,10小时loss没有任何降低
The text was updated successfully, but these errors were encountered: