Christina Theodoris commited on
Commit
2181aa4
1 Parent(s): 879a878

Modify quant_layers to convert layer nums to integers before calculating max

Browse files
Files changed (1) hide show
  1. geneformer/in_silico_perturber.py +1 -1
geneformer/in_silico_perturber.py CHANGED
@@ -44,7 +44,7 @@ def quant_layers(model):
44
  layer_nums = []
45
  for name, parameter in model.named_parameters():
46
  if "layer" in name:
47
- layer_nums += [name.split("layer.")[1].split(".")[0]]
48
  return int(max(layer_nums))+1
49
 
50
  def flatten_list(megalist):
 
44
  layer_nums = []
45
  for name, parameter in model.named_parameters():
46
  if "layer" in name:
47
+ layer_nums += [int(name.split("layer.")[1].split(".")[0])]
48
  return int(max(layer_nums))+1
49
 
50
  def flatten_list(megalist):