Skip to content
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

RuntimeError: mat1 and mat2 must have the same dtype #7

Open
TdzBAS opened this issue Aug 13, 2024 · 2 comments
Open

RuntimeError: mat1 and mat2 must have the same dtype #7

TdzBAS opened this issue Aug 13, 2024 · 2 comments

Comments

@TdzBAS
Copy link

TdzBAS commented Aug 13, 2024

Hi,

I receive following error message after executing:
%%time
cefcon_results_dict = {}
for li, data_li in data.items():
# We suggest setting up multiple repeats to minimize the randomness of the computation.
cefcon_GRN_model = cf.NetModel(epochs=350, repeats=3, cuda=CUDA, seed=-1)
cefcon_GRN_model.run(data_li)

cefcon_results = cefcon_GRN_model.get_cefcon_results(edge_threshold_avgDegree=8)
cefcon_results_dict[li] = cefcon_results

full error message:

image
data object:
image

Could you help me here please?

Best,
Tolga

@Roger-GOAT
Copy link

@WPZgithub @TdzBAS same issue. Does it solved?

@tobylanser
Copy link

Hi @Roger-GOAT @TdzBAS @WPZgithub
I found that this works for me:

import numpy as np
data_matrix = adata.X
# Convert the data matrix to float
data_matrix_float = data_matrix.astype(np.float32)
adata.X = data_matrix_float

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants