autoencoder icon indicating copy to clipboard operation
autoencoder copied to clipboard

UnimplementedError: TensorArray has size zero, but element shape <unknown> is not fully defined.

Open TobiasEl opened this issue 6 years ago • 3 comments

Hi, I have this problem: UnimplementedError (see above for traceback): TensorArray has size zero, but element shape is not fully defined. Currently only static shapes are supported when packing zero-size TensorArrays.

I know this problem was already report. But did you fix this problem? Or there is a way that can I do it by my self?

Thank You.

TobiasEl avatar May 23 '19 17:05 TobiasEl

This happens when using a corpus with a small size. The preprocessing script separates sentences in bins of length 10-20, 20-30, 30-40, etc. If any of these are empty, this error happens.

erickrf avatar May 24 '19 15:05 erickrf

Getting same issue with large text. Here is the output I got from preprocessing: Creating vocabulary... Converting word to indices... Converting 682 sentences with length between 31 and 40 Converting 915 sentences with length between 21 and 30 Converting 314 sentences with length between 51 and 60 Converting 1655 sentences with length between 1 and 10 Converting 1206 sentences with length between 11 and 20 Converting 526 sentences with length between 41 and 50 Converting 275 sentences with length between -9 and 0 Numeric representation ready As you can see none of these are empty

Devon7925 avatar May 24 '19 19:05 Devon7925

Looks like this is caused by 0 length lines You should filter those out

Devon7925 avatar May 24 '19 20:05 Devon7925