> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wandb.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# バッチごとに一部のメトリクスをログし、他のメトリクスはエポックごとにのみログしたい場合はどうすればよいですか？

各バッチで特定のメトリクスをログし、プロットを統一するには、必要な x-axis の値もメトリクスとあわせてログします。カスタムプロットで **Edit** をクリックし、カスタムの x-axis を選択します。

```python theme={null}
import wandb

with wandb.init() as run:
    run.log({"batch": batch_idx, "loss": 0.3})
    run.log({"epoch": epoch, "val_acc": 0.94})
```

***

<Badge stroke shape="pill" color="orange" size="md">[Experiments](/ja/support/models/tags/experiments)</Badge><Badge stroke shape="pill" color="orange" size="md">[メトリクス](/ja/support/models/tags/metrics)</Badge>
