> For the complete documentation index, see [llms.txt](https://hypergan.gitbook.io/hypergan/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hypergan.gitbook.io/hypergan/tutorials/training.md).

# Training a GAN

Thanks for trying out hypergan. This tutorial will walk you through creating your first model, exploring it, and building/deploying the generator.

## Acquiring a dataset

You can acquire a dataset by having a folder full of loose images.

## Getting started

First install hypergan.

## Testing install

To test hypergan is installed correctly, run `hypergan new . -l`

You can view video card usage with `nvidia-smi`

## Training hypergan

You can run:

```
  hypergan train /path/to/data -c myconfig  -s 256x256x3 -format png --sampler static_batch --sample_every 10
```

Once hypergan is working, you can sample your

## Sampling your model

You've created an infinite manifold. Great! With any luck it's diverse. You can see how diverse your model is by using:

```
  hypergan sample /path/to/data -c myconfig -s 256x256x3 -format png --sampler batch_walk
```

## Building your model

```
  hypergan build /path/to/data -c myconfig -s 256x256x3 -format png --sampler batch --sample_every 10
```

## Deploying your model

You've made a great model you'd like to share. Awesome! You can deploy it to users through a few methods.

## TODO


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://hypergan.gitbook.io/hypergan/tutorials/training.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
