HemanM commited on
Commit
7206cd8
·
verified ·
1 Parent(s): 97d3ebe

Update evo_architecture.py

Browse files
Files changed (1) hide show
  1. evo_architecture.py +1 -2
evo_architecture.py CHANGED
@@ -40,7 +40,7 @@ def mutate_genome(base_config, exploration_rate=0.5):
40
  # ✅ Fix: Ensure embed_dim is divisible by num_heads
41
  embed_dim = 512 # Your hardcoded d_model
42
  if config["num_heads"] > embed_dim:
43
- config["num_heads"] = max(1, embed_dim // 64) # fallback
44
  while embed_dim % config["num_heads"] != 0:
45
  config["num_heads"] -= 1
46
  if config["num_heads"] <= 0:
@@ -49,7 +49,6 @@ def mutate_genome(base_config, exploration_rate=0.5):
49
 
50
  return config
51
 
52
-
53
  def log_genome(config, score=None):
54
  row = [
55
  config.get("genome_id", ""),
 
40
  # ✅ Fix: Ensure embed_dim is divisible by num_heads
41
  embed_dim = 512 # Your hardcoded d_model
42
  if config["num_heads"] > embed_dim:
43
+ config["num_heads"] = max(1, embed_dim // 64)
44
  while embed_dim % config["num_heads"] != 0:
45
  config["num_heads"] -= 1
46
  if config["num_heads"] <= 0:
 
49
 
50
  return config
51
 
 
52
  def log_genome(config, score=None):
53
  row = [
54
  config.get("genome_id", ""),