LiLabAtVT / DeepTE

Neural network classification of TE
BSD 3-Clause "New" or "Revised" License
82 stars 7 forks source link

ValueError: Kernel shape must have the same length as input, but received kernel of shape (1, 3, 1, 100) and input of shape (None, None, 1, 16384, 1). #34

Open Alice520rabbit opened 5 months ago

Alice520rabbit commented 5 months ago

When I am using DeepTE to identify TEs which have been identified by RepeatModeler, this error will happen, how can I do to solve this problem?

songliVT commented 5 months ago

This error seems to mean your input sequence is empty, can you double check what is the input matrix?

Song

Get Outlook for Androidhttps://aka.ms/AAb9ysg


From: Alice520rabbit @.> Sent: Friday, April 26, 2024 7:52:26 AM To: LiLabAtVT/DeepTE @.> Cc: Subscribed @.***> Subject: [LiLabAtVT/DeepTE] ValueError: Kernel shape must have the same length as input, but received kernel of shape (1, 3, 1, 100) and input of shape (None, None, 1, 16384, 1). (Issue #34)

When I am using DeepTE to identify TEs which have been identified by RepeatModeler, this error will happen, how can I do to solve this problem?

— Reply to this email directly, view it on GitHubhttps://github.com/LiLabAtVT/DeepTE/issues/34, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACEEENV4K4LO5QVCW3KHOILY7I5XVAVCNFSM6AAAAABG2UMUSKVHI2DSMVQWIX3LMV43ASLTON2WKOZSGI3DKNRSGEYTAMQ. You are receiving this because you are subscribed to this thread.Message ID: @.***>

Alice520rabbit commented 5 months ago

Dear Song, I checked the input file to make sure that is a fasta file which is not empty, but the result is the same. Then I used the test_file to test, and the result is the same as the above. I am confused why this happened, could you give me some help? Best wishes!

Alice520rabbit commented 5 months ago

2024-04-26 20:46:04.459945: I tensorflow/core/util/port.cc:113] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable TF_ENABLE_ONEDNN_OPTS=0. 2024-04-26 20:46:04.460385: I external/local_tsl/tsl/cuda/cudart_stub.cc:32] Could not find cuda drivers on your machine, GPU will not be used. 2024-04-26 20:46:04.466552: I external/local_tsl/tsl/cuda/cudart_stub.cc:32] Could not find cuda drivers on your machine, GPU will not be used. 2024-04-26 20:46:04.541269: I tensorflow/core/platform/cpu_feature_guard.cc:210] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations. To enable the following instructions: AVX2 AVX512F AVX512_VNNI FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags. 2024-04-26 20:46:05.566745: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT start time is 1714135566.4546635 Step1: transfer fasta data to CNN input data Step2: classify TEs Step2: 2) domain information is not exist /public/home/liqr/miniconda3/envs/repbox-re/lib/python3.12/site-packages/keras/src/layers/convolutional/base_conv.py:99: UserWarning: Do not pass an input_shape/input_dim argument to a layer. When using Sequential models, prefer using an Input(shape) object as the first layer in the model instead. super().init( Traceback (most recent call last): File "/public/home/liqr/DeepTE-master/DeepTE.py", line 274, in main() File "/public/home/liqr/DeepTE-master/DeepTE.py", line 249, in main pipeline_no_m.classify_pipeline(model_dir, input_CNN_data_file, temp_store_opt_dir, sp_type,te_fam,prop_thr) File "/public/home/liqr/DeepTE-master/scripts/DeepTE_pipeline_no_modification.py", line 339, in classify_pipeline predict_te(model_file_dic[model_name], model_name, x_all_test_list, y_all_test_nm_list,input_spe_type,y_all_test_nm_list,prop_thr) File "/public/home/liqr/DeepTE-master/scripts/DeepTE_pipeline_no_modification.py", line 210, in predict_te model = load_model(model) ^^^^^^^^^^^^^^^^^ File "/public/home/liqr/miniconda3/envs/repbox-re/lib/python3.12/site-packages/keras/src/saving/saving_api.py", line 183, in load_model return legacy_h5_format.load_model_from_hdf5(filepath) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/public/home/liqr/miniconda3/envs/repbox-re/lib/python3.12/site-packages/keras/src/legacy/saving/legacy_h5_format.py", line 133, in load_model_from_hdf5 model = saving_utils.model_from_config( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/public/home/liqr/miniconda3/envs/repbox-re/lib/python3.12/site-packages/keras/src/legacy/saving/saving_utils.py", line 85, in model_from_config return serialization.deserialize_keras_object( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/public/home/liqr/miniconda3/envs/repbox-re/lib/python3.12/site-packages/keras/src/legacy/saving/serialization.py", line 495, in deserialize_keras_object deserialized_obj = cls.from_config( ^^^^^^^^^^^^^^^^ File "/public/home/liqr/miniconda3/envs/repbox-re/lib/python3.12/site-packages/keras/src/models/sequential.py", line 336, in from_config model.add(layer) File "/public/home/liqr/miniconda3/envs/repbox-re/lib/python3.12/site-packages/keras/src/models/sequential.py", line 117, in add self._maybe_rebuild() File "/public/home/liqr/miniconda3/envs/repbox-re/lib/python3.12/site-packages/keras/src/models/sequential.py", line 136, in _maybe_rebuild self.build(input_shape) File "/public/home/liqr/miniconda3/envs/repbox-re/lib/python3.12/site-packages/keras/src/layers/layer.py", line 224, in build_wrapper original_build_method(*args, **kwargs) File "/public/home/liqr/miniconda3/envs/repbox-re/lib/python3.12/site-packages/keras/src/models/sequential.py", line 177, in build x = layer(x) ^^^^^^^^ File "/public/home/liqr/miniconda3/envs/repbox-re/lib/python3.12/site-packages/keras/src/utils/traceback_utils.py", line 123, in error_handler raise e.with_traceback(filtered_tb) from None File "/public/home/liqr/miniconda3/envs/repbox-re/lib/python3.12/site-packages/keras/src/ops/operation_utils.py", line 185, in compute_conv_output_shape raise ValueError( ValueError: Kernel shape must have the same length as input, but received kernel of shape (1, 3, 1, 100) and input of shape (None, None, 1, 16384, 1).

songliVT commented 5 months ago

Hello Alice,

I would like to suggest you contact Dr. Ou and use their package, EDTA, for your annotation of TE work.

https://github.com/oushujun/EDTA

DeepTE was a pet project from a previous student who has now moved on to a different position. We no longer have funding to maintain this package. Using EDTA would be a better and more sustainable solution for your task.

Best, Song


Associate Professor in Plant Genomics and Bioinformatics School of Plant and Environmental Sciences Virginia Polytechnic Institute and State University

zoom https://virginiatech.zoom.us/j/8790572835


From: Alice520rabbit @.> Sent: Friday, April 26, 2024 9:16 AM To: LiLabAtVT/DeepTE @.> Cc: Li, Song @.>; Comment @.> Subject: Re: [LiLabAtVT/DeepTE] ValueError: Kernel shape must have the same length as input, but received kernel of shape (1, 3, 1, 100) and input of shape (None, None, 1, 16384, 1). (Issue #34)

2024-04-26 20:46:04.459945: I tensorflow/core/util/port.cc:113] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable TF_ENABLE_ONEDNN_OPTS=0. 2024-04-26 20:46:04.460385: I external/local_tsl/tsl/cuda/cudart_stub.cc:32] Could not find cuda drivers on your machine, GPU will not be used. 2024-04-26 20:46:04.466552: I external/local_tsl/tsl/cuda/cudart_stub.cc:32] Could not find cuda drivers on your machine, GPU will not be used. 2024-04-26 20:46:04.541269: I tensorflow/core/platform/cpu_feature_guard.cc:210] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations. To enable the following instructions: AVX2 AVX512F AVX512_VNNI FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags. 2024-04-26 20:46:05.566745: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT start time is 1714135566.4546635 Step1: transfer fasta data to CNN input data Step2: classify TEs Step2: 2) domain information is not exist /public/home/liqr/miniconda3/envs/repbox-re/lib/python3.12/site-packages/keras/src/layers/convolutional/base_conv.py:99: UserWarning: Do not pass an input_shape/input_dim argument to a layer. When using Sequential models, prefer using an Input(shape) object as the first layer in the model instead. super().init( Traceback (most recent call last): File "/public/home/liqr/DeepTE-master/DeepTE.py", line 274, in main() File "/public/home/liqr/DeepTE-master/DeepTE.py", line 249, in main pipeline_no_m.classify_pipeline(model_dir, input_CNN_data_file, temp_store_opt_dir, sp_type,te_fam,prop_thr) File "/public/home/liqr/DeepTE-master/scripts/DeepTE_pipeline_no_modification.py", line 339, in classify_pipeline predict_te(model_file_dic[model_name], model_name, x_all_test_list, y_all_test_nm_list,input_spe_type,y_all_test_nm_list,prop_thr) File "/public/home/liqr/DeepTE-master/scripts/DeepTE_pipeline_no_modification.py", line 210, in predict_te model = load_model(model) ^^^^^^^^^^^^^^^^^ File "/public/home/liqr/miniconda3/envs/repbox-re/lib/python3.12/site-packages/keras/src/saving/saving_api.py", line 183, in load_model return legacy_h5_format.load_model_from_hdf5(filepath) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/public/home/liqr/miniconda3/envs/repbox-re/lib/python3.12/site-packages/keras/src/legacy/saving/legacy_h5_format.py", line 133, in load_model_from_hdf5 model = saving_utils.model_from_config( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/public/home/liqr/miniconda3/envs/repbox-re/lib/python3.12/site-packages/keras/src/legacy/saving/saving_utils.py", line 85, in model_from_config return serialization.deserialize_keras_object( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/public/home/liqr/miniconda3/envs/repbox-re/lib/python3.12/site-packages/keras/src/legacy/saving/serialization.py", line 495, in deserialize_keras_object deserialized_obj = cls.from_config( ^^^^^^^^^^^^^^^^ File "/public/home/liqr/miniconda3/envs/repbox-re/lib/python3.12/site-packages/keras/src/models/sequential.py", line 336, in from_config model.add(layer) File "/public/home/liqr/miniconda3/envs/repbox-re/lib/python3.12/site-packages/keras/src/models/sequential.py", line 117, in add self._maybe_rebuild() File "/public/home/liqr/miniconda3/envs/repbox-re/lib/python3.12/site-packages/keras/src/models/sequential.py", line 136, in _maybe_rebuild self.build(input_shape) File "/public/home/liqr/miniconda3/envs/repbox-re/lib/python3.12/site-packages/keras/src/layers/layer.py", line 224, in build_wrapper original_build_method(*args, **kwargs) File "/public/home/liqr/miniconda3/envs/repbox-re/lib/python3.12/site-packages/keras/src/models/sequential.py", line 177, in build x = layer(x) ^^^^^^^^ File "/public/home/liqr/miniconda3/envs/repbox-re/lib/python3.12/site-packages/keras/src/utils/traceback_utils.py", line 123, in error_handler raise e.with_traceback(filtered_tb) from None File "/public/home/liqr/miniconda3/envs/repbox-re/lib/python3.12/site-packages/keras/src/ops/operation_utils.py", line 185, in compute_conv_output_shape raise ValueError( ValueError: Kernel shape must have the same length as input, but received kernel of shape (1, 3, 1, 100) and input of shape (None, None, 1, 16384, 1).

— Reply to this email directly, view it on GitHubhttps://github.com/LiLabAtVT/DeepTE/issues/34#issuecomment-2079377467, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACEEENROJBXRQ2PQP6Q2I6DY7JHRFAVCNFSM6AAAAABG2UMUSKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANZZGM3TONBWG4. You are receiving this because you commented.Message ID: @.***>