# 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
   ```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.dobb-e.com/software/readme-1/fine-tuning-policies.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
