-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ValueError: Invalid dtype: complex64 with TF 2.16+ #50
Comments
I'm not sure why the data type is incorrect, how should I modify it? Thank you. |
Hello, thank you both for your interest in my work. @zzc121, does the error occur at the |
@NEGU93 thanks for your prompt reply. I tried the recommendation tf.as_dtype(np.complex64) however I observe the same error. Attached are the MRE file together with the datasets: #################### MRE ############################ Loading dataset and processingdef load_dataset():
CVNN model creationdef create_complex_model(self, input_features, layer_dims, activation_hidden_complex= 'cart_relu', activation_output_complex='cart_tanh',
parameter settingslayer_dims = [12, 7, 6] x_train_IQ_samples, y_train_IQ_samples, x_test_IQ_samples, y_test_IQ_samples = load_dataset() create modelmodel_complex = create_complex_model(input_features, layer_dims, activation_hidden_complex, activation_output_complex, alpha) model_complex.summary() Trainingbatch_size = 50 history = model_complex.fit(x_train_IQ_samples.T, x_test_IQ_samples.csv |
I am getting the same error |
URGENT HELP NEEDED WITH THIS!!!!! |
I changed the MRE example and it works for me. Here is the link, you can run it. I generated random numpy arrays as I don´t have the csv file. I also did some minor modifications to make it work. I encourage you all to send me a similar link with the code not working and I could try fix it. |
Thank you very much for quick reply! I did manage to run the modified code and it seems to work. The main issue seems to be the python package version mismatch, I tried to install the versions that you used in colab. I have a follow up questions though: As shown in the figure below, I see warning casting complex128 to float32. Is this related to the output layer, i.e., Imaginary separated from the Real part? Is it possible to have an output layer with only one node (units = 1)? That would output the imaginary and real together as a single output sample. I also observed the loss to be a negative value in many of the epochs, in some cases after certain number of epochs it also outputs nan. Is there any explanation to that? Is it a valid loss value? |
I'm seeing the same thing... When using either "complex_input(shape=...)" or "ComplexInput(input_shape=...)", I get the message: Does this appear to be due to an incompatibility between tensorflow and cvnn versions? The error is flagged in variables.py. This is just like @aatumo indicated 3 weeks ago. Thanks for any help. Much appreciated. |
Guys! I have been facing this issue for a few days finally managed to solve it like 5 mins ago!!!!!!! |
Thanks to @angelSAT ! |
Ok, that's bad, it seems I need to fix compatibility issues with TF 2.16+. I will check that. Thank you guys for letting me know. |
I have the same problem and it would be great if you let us know if the compatibility issue is fixed, thanks. |
Hi to all 2 root error(s) found. //////////////////////////////////////////////////////////////////////// |
Actually I can run my complex-valued NN on CPU and also conventional CNN on GPU (with Ubuntu OS), but I have a problem in working with cvnn. |
Yes, as it is a problem with CUDA, everything using the CPU should work. |
Guys! I could finally solve my problem !!! sudo apt-get install --reinstall ubuntu-desktop conda create -n CNN_GPU python=3.10.12 pip install tensorflow==2.15.0 pip install pandas |
The text was updated successfully, but these errors were encountered: