CytoCommunity
CytoCommunity copied to clipboard
Potential bugfix: Concatenation error in supervised learning file
I got the following error: the array at index 0 has size 4 and the array at index 1 has size 5
when running the Step2 script in the supervised learning set. My data has 16 images with 2 graph node categories. Hyperparameters were as follows:
## Hyperparameters
Num_TCN = 15
Num_Times = 20
Num_Folds = 8
Num_Epoch = 100
Embedding_Dimension = 512
LearningRate = 0.0001
MiniBatchSize = 8
beta = 0.9
When running, I received the error which I traced to the test()
function. It initialized pr_Table
as np.zeros([1,4])
, but when we attempt to concatenate it with pred_info
, we see that pred_info
has 5 elements instead of 4. I searched all the places where pr_Table
gets used after this part of the script, and to my knowledge, it simply gets serialized to a file but never actually used again. I fixed the issue by changing the initialization to np.zeros([1,5])
and it seems to be running without issue. Is this bugfix valid or does it cause some downstream effect that I have not foreseen?