-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Dear Dr. Ma, Dr. Fan,
Hi. I would like to consult an issue regard with working with dataType='volume'.
- python ~/work/images/pNet/fmripnet.py -c BEST_fmri_surf_subjs.toml --hpc
failed.
data type is volume
dataType = 'Volume'
data format is NIFTI, which stores a 4D matrix
dataFormat = 'Volume (*.nii, *.nii.gz, *.mat)'
- Then I went to the script folder to run the script,
(fmripnet) $ bash -x ~/BIDS/derivatives/pnet/Data_Input/Script/cluster_job_workflow.sh
++ date +%F-%H:%M:%S
-
echo -e 'Start time : 2025-09-16-13:21:13\n'
Start time : 2025-09-16-13:21:13 -
/cluster/intel/oneapi-2023.1.0/intelpython/latest/bin/python ~/BIDS/derivatives/pnet/Data_Input/Script/cluster_job_workflow.py
Intel(R) Extension for Scikit-learn* enabled (https://github.com/intel/scikit-learn-intelex)
All setups are finished
Start to run
Start FN computation using PyTorch at 2025-09-16 13:22:43
Settings are loaded from folder Data_Input, FN_Computation and Cluster
Brain template is loaded from folder Data_Input
FN computation uses spatial-regularized non-negative matrix factorization method
Traceback (most recent call last):
File "~/BIDS/derivatives/pnet/Data_Input/Script/cluster_job_workflow.py", line 178, in
pnet.run_FN_computation_torch_cluster(dir_pnet_result)
File "/home/we46dav/.local/lib/python3.9/site-packages/pnet/Module/FN_Computation_torch.py", line 512, in run_FN_computation_torch_cluster
gFN = reshape_FN(gFN, dataType=dataType, Brain_Mask=Brain_Mask)
File "/home/we46dav/.local/lib/python3.9/site-packages/pnet/Module/Data_Input.py", line 1208, in reshape_FN
if FN.shape[0] != np.sum(Brain_Mask > 0):
TypeError: '>' not supported between instances of 'dict' and 'int'
++ date +%F-%H:%M:%S
- echo -e 'Finished time : 2025-09-16-13:23:49\n'
Finished time : 2025-09-16-13:23:49
- here is the test samples:
$ mrinfo '~/BIDS/derivatives/xcp_d/sub-BEST001s01/func/sub-BEST001s01_task-rest_space-MNI152NLin2009cAsym_res-2_desc-denoised_bold.nii.gz'
Image name: "~/BIDS/derivatives/xcp_d/sub-BEST001s01/func/sub-BEST001s01_task-rest_space-MNI152NLin2009cAsym_res-2_desc-denoised_bold.nii.gz"
Dimensions: 97 x 115 x 97 x 450
Voxel size: 2 x 2 x 2 x 1.58
Data strides: [ 1 2 3 4 ]
Format: NIfTI-1.1 (GZip compressed)
Data type: 64 bit float (little endian)
Intensity scaling: offset = 0, multiplier = 1
Transform: 1 0 0 -96.5
0 1 0 -132.5
0 0 1 -78.5
what could be the reason for this error?
FN.shape[0] != np.sum(Brain_Mask > 0):
Do you have any suggestion how to fix this with my cohort?
Many thanks for your attention.
Best regards
Meng