assert that sample_count > 0, avoiding division by zero
This commit is contained in:
parent
ddf5ac257a
commit
151bfe9ee1
1 changed files with 1 additions and 1 deletions
|
@ -220,7 +220,7 @@ int64_t get_example_targets_batch(
|
||||||
bool separate_with_bos,
|
bool separate_with_bos,
|
||||||
bool fill_with_next_samples
|
bool fill_with_next_samples
|
||||||
) {
|
) {
|
||||||
|
GGML_ASSERT(samples_count > 0);
|
||||||
GGML_ASSERT(tokens_input->n_dims == 2);
|
GGML_ASSERT(tokens_input->n_dims == 2);
|
||||||
GGML_ASSERT(target_probs->n_dims == 3);
|
GGML_ASSERT(target_probs->n_dims == 3);
|
||||||
int64_t n_vocab = target_probs->ne[0];
|
int64_t n_vocab = target_probs->ne[0];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue