Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
NormanTUD committed Dec 18, 2024
1 parent c8d772c commit 8c36486
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
9 changes: 2 additions & 7 deletions predict.js
Original file line number Diff line number Diff line change
Expand Up @@ -2055,17 +2055,12 @@ async function repredict () {

function warn_if_tensor_is_disposed (tensor) {
if(!tensor) {
err("Given object is not a tensor");
return false;
}

if(!Object.keys(tensor).includes("isDisposedInternal")) {
err("Given object is not a tensor");
err(language[lang]["given_object_not_a_tensor"] || !Object.keys(tensor).includes("isDisposedInternal"));
return false;
}

if(tensor.isDisposedInternal) {
err("Tensor is already disposed, where it shouldn't be.");
err(language[lang]["tensor_already_disposed_where_it_shouldnt_be"]);
return false;
}

Expand Down
6 changes: 5 additions & 1 deletion translations.php
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,8 @@
"model_doesnt_include_layers_cannot_show_in_latex" => "model does not include layers. Cannot be shown in LaTeX",
"unknown_optimizer" => "Unknown optimizer:",
"optimizer_algorithm" => "Optimizer algorithm",
"given_object_not_a_tensor" => "Given object is not a tensor",
"tensor_already_disposed_where_it_shouldnt_be" => "Tensor is already disposed, where it shouldn't be."
),

'de' => array(
Expand Down Expand Up @@ -921,7 +923,9 @@
"done_waiting_n_seconds" => "Fertig damit, für %d Sekunden zu warten...",
"model_doesnt_include_layers_cannot_show_in_latex" => "Modell hat keine Layer. Kann nicht in LaTeX gezeigt werden.",
"unknown_optimizer" => "Unknown optimizer:",
"optimizer_algorithm" => "Optimizeralgorithmus"
"optimizer_algorithm" => "Optimizeralgorithmus",
"given_object_not_a_tensor" => "Gegebenes Objekt ist kein Tensor",
"tensor_already_disposed_where_it_shouldnt_be" => "Tensor ist bereits disposed wo er es nicht sein sollte."
)
);

Expand Down

0 comments on commit 8c36486

Please sign in to comment.