mirror of
https://github.com/ostris/ai-toolkit.git
synced 2026-04-30 11:11:37 +00:00
Add number of repeats for a dataset in the ui
This commit is contained in:
@@ -810,6 +810,14 @@ export default function SimpleJob({
|
|||||||
onChange={value => setJobConfig(value, `config.process[0].datasets[${i}].network_weight`)}
|
onChange={value => setJobConfig(value, `config.process[0].datasets[${i}].network_weight`)}
|
||||||
placeholder="eg. 1.0"
|
placeholder="eg. 1.0"
|
||||||
/>
|
/>
|
||||||
|
<NumberInput
|
||||||
|
label="Num Repeats"
|
||||||
|
value={dataset.num_repeats || 1}
|
||||||
|
className="pt-2"
|
||||||
|
onChange={value => setJobConfig(value, `config.process[0].datasets[${i}].num_repeats`)}
|
||||||
|
placeholder="eg. 1"
|
||||||
|
docKey={'dataset.num_repeats'}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<TextInput
|
<TextInput
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ export const defaultDatasetConfig: DatasetConfig = {
|
|||||||
num_frames: 1,
|
num_frames: 1,
|
||||||
flip_x: false,
|
flip_x: false,
|
||||||
flip_y: false,
|
flip_y: false,
|
||||||
|
num_repeats: 1,
|
||||||
};
|
};
|
||||||
|
|
||||||
export const defaultSliderConfig: SliderConfig = {
|
export const defaultSliderConfig: SliderConfig = {
|
||||||
|
|||||||
@@ -306,6 +306,17 @@ const docs: { [key: string]: ConfigDoc } = {
|
|||||||
</>
|
</>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
'dataset.num_repeats': {
|
||||||
|
title: 'Num Repeats',
|
||||||
|
description: (
|
||||||
|
<>
|
||||||
|
Number of Repeats will allow you to repeate the items in a dataset multiple times. This is useful when you are using multiple
|
||||||
|
datasets and want to balance the number of samples from each dataset. For instance, if you have a small dataset of 10 images
|
||||||
|
and a large dataset of 100 images, you can set the small dataset to have 10 repeats to effectively make it 100 images, making
|
||||||
|
the two datasets occour equally during training.
|
||||||
|
</>
|
||||||
|
),
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
export const getDoc = (key: string | null | undefined): ConfigDoc | null => {
|
export const getDoc = (key: string | null | undefined): ConfigDoc | null => {
|
||||||
|
|||||||
@@ -103,6 +103,7 @@ export interface DatasetConfig {
|
|||||||
fps?: number;
|
fps?: number;
|
||||||
flip_x: boolean;
|
flip_x: boolean;
|
||||||
flip_y: boolean;
|
flip_y: boolean;
|
||||||
|
num_repeats?: number;
|
||||||
control_path_1?: string | null;
|
control_path_1?: string | null;
|
||||||
control_path_2?: string | null;
|
control_path_2?: string | null;
|
||||||
control_path_3?: string | null;
|
control_path_3?: string | null;
|
||||||
|
|||||||
Reference in New Issue
Block a user