Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
mamengyiyi authored Jan 7, 2023
1 parent 9847e11 commit f4597ce
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions offline-rl-algorithms/REDQ/redq-train.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import argparse
import gym
import tjuOfflineRL
import d3rlpy
import torch


Expand All @@ -18,19 +18,19 @@ def main():
eval_env = gym.make(args.env)

# fix seed
tjuOfflineRL.seed(args.seed)
d3rlpy.seed(args.seed)
env.seed(args.seed)
eval_env.seed(args.seed)

# load algorithm
redq = tjuOfflineRL.algos.REDQ(batch_size=256,
redq = d3rlpy.algos.REDQ(batch_size=256,
actor_learning_rate=3e-4,
critic_learning_rate=3e-4,
temp_learning_rate=3e-4,
use_gpu=args.gpu)

# replay buffer for experience replay
buffer = tjuOfflineRL.online.buffers.ReplayBuffer(maxlen=1000000, env=env)
buffer = d3rlpy.online.buffers.ReplayBuffer(maxlen=1000000, env=env)

# start training
redq.fit_online_redq(env,
Expand Down

0 comments on commit f4597ce

Please sign in to comment.