CEFCON icon indicating copy to clipboard operation
CEFCON copied to clipboard

RuntimeError: mat1 and mat2 must have the same dtype

Open TolgaDuz opened this issue 1 year ago • 2 comments

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

TolgaDuz avatar Aug 13 '24 13:08 TolgaDuz

@WPZgithub @TdzBAS same issue. Does it solved?

TangentDeng avatar Oct 02 '24 00:10 TangentDeng

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

tobylanser avatar Oct 25 '24 22:10 tobylanser