mirror of
https://github.com/NousResearch/atropos.git
synced 2026-04-25 17:10:42 +00:00
update: sandbox
This commit is contained in:
parent
f70103c781
commit
48941b455c
2 changed files with 16 additions and 0 deletions
14
environments/optimizer/test.py
Normal file
14
environments/optimizer/test.py
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
from modal.functions import Function
|
||||
|
||||
send_code = Function.from_name("optimizer-test", "send_code")
|
||||
|
||||
res = send_code.remote("""
|
||||
import torch
|
||||
import math
|
||||
|
||||
class CustomOptimizer(torch.optim.Optimizer):
|
||||
def __init__(self, params, lr=0.01, beta1=0.9, beta2=0.999, eps=1e-8):
|
||||
defaults = dict(lr=lr, beta1=beta1, beta2=beta2, eps=eps)
|
||||
""")
|
||||
|
||||
print(res)
|
||||
Loading…
Add table
Add a link
Reference in a new issue