# Fine-tuning Policies

## Training Policies

The following assumes that the current working directory is this repository’s root folder.

### Training a Behavior Cloning Policy

1. Modify `include_task` and `include_env` in `finetune.yaml` depending on the task and env you intend to finetune.
2. \[Optional, non-default:] only if you're using torch encoder, set `enc_weight_pth` (path to pretrained encoder weights) in `image_bc_depth.yaml`. You can download the weights from <https://dl.dobb-e.com/models/hpr_model.pt> if you don't have them.
3. Run in terminal:

   ```bash
   python train.py --config-name=finetune
   ```
4. \[Optional, experimental] If you want to take advantage of multi-GPU training using 🤗 accelerate, you can use the following command:<br>

   ```bash
   accelerate config # Only the first time, to configure accelerate
   accelerate launch train.py --config-name=finetune
   ```
