Xtmp=np.array(np.expand_dims(X[sample_index],axis=0))
Xtmp[0][0][base_pos]=cur_base
//get the logit of Xtmp
Xtmp_logit=np.squeeze(preact_function(Xtmp),axis=0)
mutants_expanded[sample_index][0][base_pos][base_letter]=Xtmp_logit[task_index]
//subtract wt_expanded from mutants_expanded
ism_vals=mutants_expanded-wt_expanded
//For each position subtract the mean ISM score for that position from each of the 4 values
After Change
wt_expanded=np.zeros(output_dim)
mutants_expanded=np.zeros(output_dim)
empty_onehot=np.zeros(output_dim[3])
if start_pos is None:
start_pos=0
if end_pos is None:
end_pos=output_dim[2]
/Ǚ. Iterate through all tasks, positions