VoyagerYuan commited on
Commit
2f88585
·
1 Parent(s): d3941bf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +22 -22
app.py CHANGED
@@ -273,28 +273,28 @@ NUM_SENDERS = st.sidebar.slider("NUM_SENDERS", 1, 10, 2)
273
  NUM_RECEIVERS = st.sidebar.slider("NUM_RECEIVERS", 1, 10, 2)
274
  num_rounds = st.sidebar.slider("num_rounds", 1000, 100000, 10000, 1000)
275
 
276
- use_cosine_annealing = st.sidebar.checkbox("Use Annealing")
277
- if use_cosine_annealing:
278
- annealing_strategy = st.sidebar.selectbox("Annealing Strategy", ["linear", "cosine"])
279
- TAU = st.sidebar.slider("Start Temp.", 0.1, 10.0, 1.0)
280
- final_tau = st.sidebar.slider("Final Temp.", 0.1, 10.0, 1.0)
281
- else:
282
- annealing_strategy = None
283
- TAU = st.sidebar.slider("TAU", 0.1, 10.0, 1.0)
284
-
285
- optimizer_options = ["Adam", "AdamW", "SGD"]
286
- OPTMIZER = st.sidebar.selectbox("Optimizer", optimizer_options)
287
- LEARNING_RATE = st.sidebar.slider("Learning Rate", 1e-5, 1e-2, 1e-3)
288
-
289
-
290
- EMBEDDING_DIM = st.sidebar.slider("EMBEDDING_DIM", 1, 128, 16)
291
- HIDDEN_DIM = st.sidebar.slider("HIDDEN_DIM", 1, 128, 16)
292
- LATENT_DIM = st.sidebar.slider("LATENT_DIM", 1, 128, 16)
293
- SEQ_LEN = st.sidebar.slider("SEQ_LEN", 1, 128, 16)
294
- # TAU = st.sidebar.slider("TAU", 0.1, 10.0, 1.0)
295
- NHEAD = st.sidebar.slider("nhead", 1, 8, 4)
296
- NUM_LAYERS = st.sidebar.slider("num_layers", 1, 6, 2)
297
- BATCH_SIZE = st.sidebar.slider("BATCH_SIZE", 1, 128, 32)
298
 
299
  if st.sidebar.button('Start'):
300
  train_signal_game(NUM_SENDERS, NUM_RECEIVERS, num_rounds)
 
273
  NUM_RECEIVERS = st.sidebar.slider("NUM_RECEIVERS", 1, 10, 2)
274
  num_rounds = st.sidebar.slider("num_rounds", 1000, 100000, 10000, 1000)
275
 
276
+ advanced_settings = st.sidebar.expander("Advanced settings")
277
+ with advanced_settings:
278
+ use_cosine_annealing = st.checkbox("Use Annealing")
279
+ if use_cosine_annealing:
280
+ annealing_strategy = st.selectbox("Annealing Strategy", ["linear", "cosine"])
281
+ TAU = st.slider("Start Temp.", 0.1, 10.0, 1.0)
282
+ final_tau = st.slider("Final Temp.", 0.1, 10.0, 1.0)
283
+ else:
284
+ annealing_strategy = None
285
+ TAU = st.slider("TAU", 0.1, 10.0, 1.0)
286
+
287
+ optimizer_options = ["Adam", "AdamW", "SGD"]
288
+ OPTMIZER = st.selectbox("Optimizer", optimizer_options)
289
+ LEARNING_RATE = st.slider("Learning Rate", 1e-5, 1e-2, 1e-3)
290
+
291
+ EMBEDDING_DIM = st.slider("EMBEDDING_DIM", 1, 128, 16)
292
+ HIDDEN_DIM = st.slider("HIDDEN_DIM", 1, 128, 16)
293
+ LATENT_DIM = st.slider("LATENT_DIM", 1, 128, 16)
294
+ SEQ_LEN = st.slider("SEQ_LEN", 1, 128, 16)
295
+ NHEAD = st.slider("nhead", 1, 8, 4)
296
+ NUM_LAYERS = st.slider("num_layers", 1, 6, 2)
297
+ BATCH_SIZE = st.slider("BATCH_SIZE", 1, 128, 32)
298
 
299
  if st.sidebar.button('Start'):
300
  train_signal_game(NUM_SENDERS, NUM_RECEIVERS, num_rounds)