MicrobeLab / DeepMicrobes

DeepMicrobes: taxonomic classification for metagenomics with deep learning
https://doi.org/10.1093/nargab/lqaa009
Apache License 2.0
81 stars 21 forks source link

tensorflow.python.framework.errors_impl.InvalidArgumentError #1

Closed yi1873 closed 4 years ago

yi1873 commented 4 years ago

Training error: "tensorflow.python.framework.errors_impl.InvalidArgumentError: Cannot add tensor to the batch: number of elements does not match. Shapes are: [tensor]: [2516], [batch]: [2337] [[{{node IteratorGetNext}}]] During handling of the above exception, another exception occurred".

How to solve this problem?

MicrobeLab commented 4 years ago

Thank you for your interest in DeepMicrobes. Please provide a demo of your training data (fastq/fasta) and the commands used to produce training set and train the model.

yi1873 commented 4 years ago

http://note.youdao.com/noteshare?id=10c2065724c8d4c2276bbc2ccef4b433

MicrobeLab commented 4 years ago

Currently DeepMicrobes only supports training on sequences with the same length. Will allow users to specify the maximum sequence length and zero-padding the sequences shorter than that length in the next version. Alternatively, you could trim your sequences to a fix length before converting them to TFRecord. Thanks.

MicrobeLab commented 4 years ago

The new version of DeepMicrobes can be trained and tested on variable-length sequences.