Open xingyangfeng opened 3 years ago
max_document_length = max([len(x.split(" ")) for x in x_text]) vocab_processor = estimator.preprocessing.VocabularyProcessor(max_document_length) x = np.array(list(vocab_processor.fit_transform(x_text)))
Try upgrading your tensorflow version
max_document_length = max([len(x.split(" ")) for x in x_text]) vocab_processor = estimator.preprocessing.VocabularyProcessor(max_document_length) x = np.array(list(vocab_processor.fit_transform(x_text)))