//mutagenize each position
temp_batch = []
tempbatch_baseposandletter = []
for base_pos in range(start_pos,end_pos):
//for each position, iterate through the 4 bases
for base_letter in range(output_dim[3]):
cur_base=np.array(empty_onehot)
After Change
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