usage example did not work because of typo and torch not imported
#1
by DalasNoin - opened
123456789101112131415161718192021222324252627282930313233343536373839404142434445---tags:- deep-reinforcement-learning- reinforcement-learning---Find here pretrained model weights for the [Decision Transformer] (https://github.com/kzl/decision-transformer).Weights are available for 4 Atari games: Breakout, Pong, Qbert and Seaquest. Found in the checkpoints directory.We share models trained for one seed (123), whereas the paper contained weights for 3 random seeds.### Usage```git clone https://huggingface.co/edbeeching/decision_transformer_atariconda env create -f conda_env.yml```Then, you can use the model like this:```pythonfrom decision_transform_atari import GPTConfig, GPTvocab_size = 4block_size = 90model_type = "reward_conditioned"timesteps = 2654mconf = GPTConfig(vocab_size,block_size,n_layer=6,n_head=8,n_embd=128,model_type=model_type,max_timestep=timesteps,)model = GPT(mconf)checkpoint_path = "checkpoints/Breakout_123.pth" # or Pong, Qbert, Seaquestcheckpoint = torch.load(checkpoint_path)model.load_state_dict(checkpoint)```123456789101112131415161718192021222324252627282930313233343536373839404142434445---tags:- deep-reinforcement-learning- reinforcement-learning---Find here pretrained model weights for the [Decision Transformer] (https://github.com/kzl/decision-transformer).Weights are available for 4 Atari games: Breakout, Pong, Qbert and Seaquest. Found in the checkpoints directory.We share models trained for one seed (123), whereas the paper contained weights for 3 random seeds.### Usage```git clone https://huggingface.co/edbeeching/decision_transformer_atariconda env create -f conda_env.yml```Then, you can use the model like this:```pythonimport torchfrom decision_transformer_atari import GPTConfig, GPTvocab_size = 4block_size = 90model_type = "reward_conditioned"timesteps = 2654mconf = GPTConfig(vocab_size,block_size,n_layer=6,n_head=8,n_embd=128,model_type=model_type,max_timestep=timesteps,)model = GPT(mconf)checkpoint_path = "checkpoints/Breakout_123.pth" # or Pong, Qbert, Seaquestcheckpoint = torch.load(checkpoint_path)model.load_state_dict(checkpoint)```
README.md+45-45