diff --git "a/medomni/models.build/module.models.unet3d.losses.cpp" "b/medomni/models.build/module.models.unet3d.losses.cpp" deleted file mode 100644--- "a/medomni/models.build/module.models.unet3d.losses.cpp" +++ /dev/null @@ -1,20125 +0,0 @@ -/* Generated code for Python module 'models.unet3d.losses' - * created by Nuitka version 0.6.16 - * - * This code is in part copyright 2021 Kay Hayen. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "nuitka/prelude.h" - -#include "nuitka/unfreezing.h" - -#include "__helpers.h" - -/* The "module_models$unet3d$losses" is a Python object pointer of module type. - * - * Note: For full compatibility with CPython, every module variable access - * needs to go through it except for cases where the module cannot possibly - * have changed in the mean time. - */ - -PyObject *module_models$unet3d$losses; -PyDictObject *moduledict_models$unet3d$losses; - -/* The declarations of module constants used, if any. */ -static PyObject *mod_consts[206]; - -static PyObject *module_filename_obj = NULL; - -/* Indicator if this modules private constants were created yet. */ -static bool constants_created = false; - -/* Function to create module private constants. */ -static void createModuleConstants(void) { - if (constants_created == false) { - loadConstantsBlob(&mod_consts[0], UNTRANSLATE("models.unet3d.losses")); - constants_created = true; - } -} - -/* For multiprocessing, we want to be able to initialize the __main__ constants. */ -#if (_NUITKA_PLUGIN_MULTIPROCESSING_ENABLED || _NUITKA_PLUGIN_TRACEBACK_ENCRYPTION_ENABLED) && 0 -void createMainModuleConstants(void) { - createModuleConstants(); -} -#endif - -/* Function to verify module private constants for non-corruption. */ -#ifndef __NUITKA_NO_ASSERT__ -void checkModuleConstants_models$unet3d$losses(void) { - // The module may not have been used at all, then ignore this. - if (constants_created == false) return; - - checkConstantsBlob(&mod_consts[0], "models.unet3d.losses"); -} -#endif - -// The module code objects. -static PyCodeObject *codeobj_bbd4e7afc692945e27dee598a8242d6c; -static PyCodeObject *codeobj_705bf4315d2d4f531dff5d3d03b1beec; -static PyCodeObject *codeobj_79c7d5960b91f122e38985085658fe13; -static PyCodeObject *codeobj_7a70797e1919541bc6bae64c7102f99b; -static PyCodeObject *codeobj_0f3b06d4df296077ba10f315932c80a2; -static PyCodeObject *codeobj_829d0a1ffa540ba75404cd988b32f0b5; -static PyCodeObject *codeobj_102f6d9c8caf3c07fcacb9b74c819b61; -static PyCodeObject *codeobj_b82f846403c5bbd1de1ab21ea54bad05; -static PyCodeObject *codeobj_0812d28c0fd416b215956f202c82484e; -static PyCodeObject *codeobj_f19ed9ee26d93c2e82ea0c001dacbbbc; -static PyCodeObject *codeobj_653cd49c73152390d2f5ad682e34a196; -static PyCodeObject *codeobj_619124ae3c7c6b52dec6da317ecfa60b; -static PyCodeObject *codeobj_f0147916ca8a0f188f736d2445a24142; -static PyCodeObject *codeobj_45f52b2af41ae9eeda8b8dceada0ce54; -static PyCodeObject *codeobj_4eb47512d57f9eb20a1993d6d1c3fb78; -static PyCodeObject *codeobj_7fca07fbabf40b9aedb62b82b03ac314; -static PyCodeObject *codeobj_689fefa3b59b704f733760f36572546b; -static PyCodeObject *codeobj_915a2da7d900624b990aa096cbb70b79; -static PyCodeObject *codeobj_967b9bb58a2e42c245494faa4e98659a; -static PyCodeObject *codeobj_38eaebfe4d2be968a308d6c799019465; -static PyCodeObject *codeobj_c60e6b0b6cbf537f64facb5040a84769; -static PyCodeObject *codeobj_48d8d9a1daf8117bcef99d7047b108c4; -static PyCodeObject *codeobj_ad5336bf04811a8c76dcc0c2c51b6074; -static PyCodeObject *codeobj_f96de2d7cdf8118d4114f6e4b5a0cc47; -static PyCodeObject *codeobj_7138dc343b9d36f61ecf5068b1d4a9e2; -static PyCodeObject *codeobj_d8de5593120711397ebcd544a9a5beee; -static PyCodeObject *codeobj_0201c31e1e7feff6304044e6d3951db4; -static PyCodeObject *codeobj_df030e46b619f2e1d7bbe1bf22d15c8c; -static PyCodeObject *codeobj_3a3c4357c3d422694cae78ba51b909d4; -static PyCodeObject *codeobj_ce55a77527b8cae9d98b409844d8d681; -static PyCodeObject *codeobj_7e600e5abd5b883d8c3faab8d6f2a207; -static PyCodeObject *codeobj_599f9bc91cca49981a976e3e360b0b63; -static PyCodeObject *codeobj_d0a908219576feca58e31d68600ccb1c; -static PyCodeObject *codeobj_ca8b7a4c8713e1d10286835f390e025f; -static PyCodeObject *codeobj_4f67554983fc1bad95f8404ef1c044ec; - -static void createModuleCodeObjects(void) { - module_filename_obj = MAKE_RELATIVE_PATH(mod_consts[182]); CHECK_OBJECT(module_filename_obj); - codeobj_bbd4e7afc692945e27dee598a8242d6c = MAKE_CODEOBJECT(module_filename_obj, 103, CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE, mod_consts[41], mod_consts[183], NULL, 1, 0, 0); - codeobj_705bf4315d2d4f531dff5d3d03b1beec = MAKE_CODEOBJECT(module_filename_obj, 1, CO_NOFREE, mod_consts[184], NULL, NULL, 0, 0, 0); - codeobj_79c7d5960b91f122e38985085658fe13 = MAKE_CODEOBJECT(module_filename_obj, 168, CO_NOFREE, mod_consts[53], mod_consts[185], NULL, 0, 0, 0); - codeobj_7a70797e1919541bc6bae64c7102f99b = MAKE_CODEOBJECT(module_filename_obj, 120, CO_NOFREE, mod_consts[58], mod_consts[185], NULL, 0, 0, 0); - codeobj_0f3b06d4df296077ba10f315932c80a2 = MAKE_CODEOBJECT(module_filename_obj, 133, CO_NOFREE, mod_consts[110], mod_consts[185], NULL, 0, 0, 0); - codeobj_829d0a1ffa540ba75404cd988b32f0b5 = MAKE_CODEOBJECT(module_filename_obj, 205, CO_NOFREE, mod_consts[66], mod_consts[185], NULL, 0, 0, 0); - codeobj_102f6d9c8caf3c07fcacb9b74c819b61 = MAKE_CODEOBJECT(module_filename_obj, 62, CO_NOFREE, mod_consts[22], mod_consts[185], NULL, 0, 0, 0); - codeobj_b82f846403c5bbd1de1ab21ea54bad05 = MAKE_CODEOBJECT(module_filename_obj, 182, CO_NOFREE, mod_consts[59], mod_consts[185], NULL, 0, 0, 0); - codeobj_0812d28c0fd416b215956f202c82484e = MAKE_CODEOBJECT(module_filename_obj, 240, CO_NOFREE, mod_consts[115], mod_consts[185], NULL, 0, 0, 0); - codeobj_f19ed9ee26d93c2e82ea0c001dacbbbc = MAKE_CODEOBJECT(module_filename_obj, 84, CO_NOFREE, mod_consts[31], mod_consts[185], NULL, 0, 0, 0); - codeobj_653cd49c73152390d2f5ad682e34a196 = MAKE_CODEOBJECT(module_filename_obj, 39, CO_NOFREE, mod_consts[12], mod_consts[185], NULL, 0, 0, 0); - codeobj_619124ae3c7c6b52dec6da317ecfa60b = MAKE_CODEOBJECT(module_filename_obj, 171, CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE, mod_consts[13], mod_consts[186], NULL, 3, 0, 0); - codeobj_f0147916ca8a0f188f736d2445a24142 = MAKE_CODEOBJECT(module_filename_obj, 206, CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE, mod_consts[13], mod_consts[187], NULL, 3, 0, 0); - codeobj_45f52b2af41ae9eeda8b8dceada0ce54 = MAKE_CODEOBJECT(module_filename_obj, 186, CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE, mod_consts[13], mod_consts[188], NULL, 2, 0, 0); - codeobj_4eb47512d57f9eb20a1993d6d1c3fb78 = MAKE_CODEOBJECT(module_filename_obj, 44, CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE, mod_consts[13], mod_consts[189], NULL, 3, 0, 0); - codeobj_7fca07fbabf40b9aedb62b82b03ac314 = MAKE_CODEOBJECT(module_filename_obj, 67, CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE, mod_consts[13], mod_consts[190], NULL, 3, 0, 0); - codeobj_689fefa3b59b704f733760f36572546b = MAKE_CODEOBJECT(module_filename_obj, 137, CO_OPTIMIZED | CO_NEWLOCALS, mod_consts[13], mod_consts[191], mod_consts[185], 3, 0, 0); - codeobj_915a2da7d900624b990aa096cbb70b79 = MAKE_CODEOBJECT(module_filename_obj, 241, CO_OPTIMIZED | CO_NEWLOCALS, mod_consts[13], mod_consts[192], mod_consts[185], 4, 0, 0); - codeobj_967b9bb58a2e42c245494faa4e98659a = MAKE_CODEOBJECT(module_filename_obj, 89, CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE, mod_consts[13], mod_consts[193], NULL, 3, 0, 0); - codeobj_38eaebfe4d2be968a308d6c799019465 = MAKE_CODEOBJECT(module_filename_obj, 126, CO_OPTIMIZED | CO_NEWLOCALS, mod_consts[13], mod_consts[193], mod_consts[185], 3, 0, 0); - codeobj_c60e6b0b6cbf537f64facb5040a84769 = MAKE_CODEOBJECT(module_filename_obj, 195, CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE, mod_consts[60], mod_consts[194], NULL, 1, 0, 0); - codeobj_48d8d9a1daf8117bcef99d7047b108c4 = MAKE_CODEOBJECT(module_filename_obj, 313, CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE, mod_consts[99], mod_consts[195], NULL, 5, 0, 0); - codeobj_ad5336bf04811a8c76dcc0c2c51b6074 = MAKE_CODEOBJECT(module_filename_obj, 10, CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE, mod_consts[47], mod_consts[196], NULL, 4, 0, 0); - codeobj_f96de2d7cdf8118d4114f6e4b5a0cc47 = MAKE_CODEOBJECT(module_filename_obj, 105, CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE, mod_consts[43], mod_consts[197], NULL, 4, 0, 0); - codeobj_7138dc343b9d36f61ecf5068b1d4a9e2 = MAKE_CODEOBJECT(module_filename_obj, 129, CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE, mod_consts[43], mod_consts[197], NULL, 4, 0, 0); - codeobj_d8de5593120711397ebcd544a9a5beee = MAKE_CODEOBJECT(module_filename_obj, 141, CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE, mod_consts[43], mod_consts[198], NULL, 4, 0, 0); - codeobj_0201c31e1e7feff6304044e6d3951db4 = MAKE_CODEOBJECT(module_filename_obj, 260, CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE, mod_consts[2], mod_consts[199], NULL, 1, 0, 0); - codeobj_df030e46b619f2e1d7bbe1bf22d15c8c = MAKE_CODEOBJECT(module_filename_obj, 72, CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE, mod_consts[82], mod_consts[200], NULL, 3, 0, 0); - codeobj_3a3c4357c3d422694cae78ba51b909d4 = MAKE_CODEOBJECT(module_filename_obj, 178, CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE, mod_consts[82], mod_consts[200], NULL, 3, 0, 0); - codeobj_ce55a77527b8cae9d98b409844d8d681 = MAKE_CODEOBJECT(module_filename_obj, 247, CO_OPTIMIZED | CO_NEWLOCALS, mod_consts[82], mod_consts[201], mod_consts[185], 3, 0, 0); - codeobj_7e600e5abd5b883d8c3faab8d6f2a207 = MAKE_CODEOBJECT(module_filename_obj, 50, CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE, mod_consts[82], mod_consts[202], NULL, 3, 0, 0); - codeobj_599f9bc91cca49981a976e3e360b0b63 = MAKE_CODEOBJECT(module_filename_obj, 109, CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE, mod_consts[82], mod_consts[203], NULL, 3, 0, 0); - codeobj_d0a908219576feca58e31d68600ccb1c = MAKE_CODEOBJECT(module_filename_obj, 190, CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE, mod_consts[82], mod_consts[197], NULL, 3, 0, 0); - codeobj_ca8b7a4c8713e1d10286835f390e025f = MAKE_CODEOBJECT(module_filename_obj, 212, CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE, mod_consts[82], mod_consts[204], NULL, 4, 0, 0); - codeobj_4f67554983fc1bad95f8404ef1c044ec = MAKE_CODEOBJECT(module_filename_obj, 275, CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE, mod_consts[181], mod_consts[205], NULL, 1, 0, 0); -} - -// The module function declarations. -NUITKA_CROSS_MODULE PyObject *impl_models$$$function__1__mro_entries_conversion(PyObject **python_pars); - - -static PyObject *MAKE_FUNCTION_models$unet3d$losses$$$function__10_dice(); - - -static PyObject *MAKE_FUNCTION_models$unet3d$losses$$$function__11___init__(PyObject *defaults, struct Nuitka_CellObject **closure); - - -static PyObject *MAKE_FUNCTION_models$unet3d$losses$$$function__12_dice(); - - -static PyObject *MAKE_FUNCTION_models$unet3d$losses$$$function__13___init__(); - - -static PyObject *MAKE_FUNCTION_models$unet3d$losses$$$function__14_forward(); - - -static PyObject *MAKE_FUNCTION_models$unet3d$losses$$$function__15___init__(PyObject *defaults); - - -static PyObject *MAKE_FUNCTION_models$unet3d$losses$$$function__16_forward(); - - -static PyObject *MAKE_FUNCTION_models$unet3d$losses$$$function__17__class_weights(); - - -static PyObject *MAKE_FUNCTION_models$unet3d$losses$$$function__18___init__(PyObject *defaults); - - -static PyObject *MAKE_FUNCTION_models$unet3d$losses$$$function__19_forward(); - - -static PyObject *MAKE_FUNCTION_models$unet3d$losses$$$function__1_compute_per_channel_dice(PyObject *defaults); - - -static PyObject *MAKE_FUNCTION_models$unet3d$losses$$$function__20___init__(PyObject *defaults, struct Nuitka_CellObject **closure); - - -static PyObject *MAKE_FUNCTION_models$unet3d$losses$$$function__21_forward(struct Nuitka_CellObject **closure); - - -static PyObject *MAKE_FUNCTION_models$unet3d$losses$$$function__22_flatten(); - - -static PyObject *MAKE_FUNCTION_models$unet3d$losses$$$function__23_get_loss_criterion(); - - -static PyObject *MAKE_FUNCTION_models$unet3d$losses$$$function__24__create_loss(); - - -static PyObject *MAKE_FUNCTION_models$unet3d$losses$$$function__2___init__(); - - -static PyObject *MAKE_FUNCTION_models$unet3d$losses$$$function__3_forward(); - - -static PyObject *MAKE_FUNCTION_models$unet3d$losses$$$function__4___init__(PyObject *defaults); - - -static PyObject *MAKE_FUNCTION_models$unet3d$losses$$$function__5_forward(); - - -static PyObject *MAKE_FUNCTION_models$unet3d$losses$$$function__6___init__(PyObject *defaults); - - -static PyObject *MAKE_FUNCTION_models$unet3d$losses$$$function__6___init__$$$function__1_lambda(); - - -static PyObject *MAKE_FUNCTION_models$unet3d$losses$$$function__7_dice(); - - -static PyObject *MAKE_FUNCTION_models$unet3d$losses$$$function__8_forward(); - - -static PyObject *MAKE_FUNCTION_models$unet3d$losses$$$function__9___init__(PyObject *defaults, struct Nuitka_CellObject **closure); - - -// The module function definitions. -static PyObject *impl_models$unet3d$losses$$$function__1_compute_per_channel_dice(struct Nuitka_FunctionObject const *self, PyObject **python_pars) { - // Preserve error status for checks -#ifndef __NUITKA_NO_ASSERT__ - NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED(); -#endif - - // Local variable declarations. - PyObject *par_input = python_pars[0]; - PyObject *par_target = python_pars[1]; - PyObject *par_epsilon = python_pars[2]; - PyObject *par_weight = python_pars[3]; - PyObject *var_intersect = NULL; - PyObject *var_denominator = NULL; - struct Nuitka_FrameObject *frame_ad5336bf04811a8c76dcc0c2c51b6074; - NUITKA_MAY_BE_UNUSED char const *type_description_1 = NULL; - PyObject *exception_type = NULL; - PyObject *exception_value = NULL; - PyTracebackObject *exception_tb = NULL; - NUITKA_MAY_BE_UNUSED int exception_lineno = 0; - int tmp_res; - PyObject *tmp_return_value = NULL; - static struct Nuitka_FrameObject *cache_frame_ad5336bf04811a8c76dcc0c2c51b6074 = NULL; - PyObject *exception_keeper_type_1; - PyObject *exception_keeper_value_1; - PyTracebackObject *exception_keeper_tb_1; - NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_1; - - // Actual function body. - // Tried code: - if (isFrameUnusable(cache_frame_ad5336bf04811a8c76dcc0c2c51b6074)) { - Py_XDECREF(cache_frame_ad5336bf04811a8c76dcc0c2c51b6074); - -#if _DEBUG_REFCOUNTS - if (cache_frame_ad5336bf04811a8c76dcc0c2c51b6074 == NULL) { - count_active_frame_cache_instances += 1; - } else { - count_released_frame_cache_instances += 1; - } - count_allocated_frame_cache_instances += 1; -#endif - cache_frame_ad5336bf04811a8c76dcc0c2c51b6074 = MAKE_FUNCTION_FRAME(codeobj_ad5336bf04811a8c76dcc0c2c51b6074, module_models$unet3d$losses, sizeof(void *)+sizeof(void *)+sizeof(void *)+sizeof(void *)+sizeof(void *)+sizeof(void *)); -#if _DEBUG_REFCOUNTS - } else { - count_hit_frame_cache_instances += 1; -#endif - } - assert(cache_frame_ad5336bf04811a8c76dcc0c2c51b6074->m_type_description == NULL); - frame_ad5336bf04811a8c76dcc0c2c51b6074 = cache_frame_ad5336bf04811a8c76dcc0c2c51b6074; - - // Push the new frame as the currently active one. - pushFrameStack(frame_ad5336bf04811a8c76dcc0c2c51b6074); - - // Mark the frame object as in use, ref count 1 will be up for reuse. - assert(Py_REFCNT(frame_ad5336bf04811a8c76dcc0c2c51b6074) == 2); // Frame stack - - // Framed code: - { - nuitka_bool tmp_condition_result_1; - PyObject *tmp_operand_name_1; - PyObject *tmp_compexpr_left_1; - PyObject *tmp_compexpr_right_1; - PyObject *tmp_called_instance_1; - PyObject *tmp_called_instance_2; - CHECK_OBJECT(par_input); - tmp_called_instance_1 = par_input; - frame_ad5336bf04811a8c76dcc0c2c51b6074->m_frame.f_lineno = 23; - tmp_compexpr_left_1 = CALL_METHOD_NO_ARGS(tmp_called_instance_1, mod_consts[0]); - if (tmp_compexpr_left_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 23; - type_description_1 = "oooooo"; - goto frame_exception_exit_1; - } - CHECK_OBJECT(par_target); - tmp_called_instance_2 = par_target; - frame_ad5336bf04811a8c76dcc0c2c51b6074->m_frame.f_lineno = 23; - tmp_compexpr_right_1 = CALL_METHOD_NO_ARGS(tmp_called_instance_2, mod_consts[0]); - if (tmp_compexpr_right_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - Py_DECREF(tmp_compexpr_left_1); - - exception_lineno = 23; - type_description_1 = "oooooo"; - goto frame_exception_exit_1; - } - tmp_operand_name_1 = RICH_COMPARE_EQ_OBJECT_OBJECT_OBJECT(tmp_compexpr_left_1, tmp_compexpr_right_1); - Py_DECREF(tmp_compexpr_left_1); - Py_DECREF(tmp_compexpr_right_1); - if (tmp_operand_name_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 23; - type_description_1 = "oooooo"; - goto frame_exception_exit_1; - } - tmp_res = CHECK_IF_TRUE(tmp_operand_name_1); - Py_DECREF(tmp_operand_name_1); - if (tmp_res == -1) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 23; - type_description_1 = "oooooo"; - goto frame_exception_exit_1; - } - tmp_condition_result_1 = (tmp_res == 0) ? NUITKA_BOOL_TRUE : NUITKA_BOOL_FALSE; - if (tmp_condition_result_1 == NUITKA_BOOL_TRUE) { - goto branch_yes_1; - } else { - goto branch_no_1; - } - } - branch_yes_1:; - { - PyObject *tmp_raise_type_1; - PyObject *tmp_raise_value_1; - tmp_raise_type_1 = PyExc_AssertionError; - tmp_raise_value_1 = mod_consts[1]; - exception_type = tmp_raise_type_1; - Py_INCREF(tmp_raise_type_1); - exception_value = tmp_raise_value_1; - Py_INCREF(tmp_raise_value_1); - exception_lineno = 23; - RAISE_EXCEPTION_WITH_VALUE(&exception_type, &exception_value, &exception_tb); - type_description_1 = "oooooo"; - goto frame_exception_exit_1; - } - branch_no_1:; - { - PyObject *tmp_assign_source_1; - PyObject *tmp_called_name_1; - PyObject *tmp_args_element_name_1; - tmp_called_name_1 = GET_STRING_DICT_VALUE(moduledict_models$unet3d$losses, (Nuitka_StringObject *)mod_consts[2]); - - if (unlikely(tmp_called_name_1 == NULL)) { - tmp_called_name_1 = GET_MODULE_VARIABLE_VALUE_FALLBACK(mod_consts[2]); - } - - if (tmp_called_name_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 25; - type_description_1 = "oooooo"; - goto frame_exception_exit_1; - } - if (par_input == NULL) { - - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[3]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - exception_lineno = 25; - type_description_1 = "oooooo"; - goto frame_exception_exit_1; - } - - tmp_args_element_name_1 = par_input; - frame_ad5336bf04811a8c76dcc0c2c51b6074->m_frame.f_lineno = 25; - tmp_assign_source_1 = CALL_FUNCTION_WITH_SINGLE_ARG(tmp_called_name_1, tmp_args_element_name_1); - if (tmp_assign_source_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 25; - type_description_1 = "oooooo"; - goto frame_exception_exit_1; - } - { - PyObject *old = par_input; - par_input = tmp_assign_source_1; - Py_XDECREF(old); - } - - } - { - PyObject *tmp_assign_source_2; - PyObject *tmp_called_name_2; - PyObject *tmp_args_element_name_2; - tmp_called_name_2 = GET_STRING_DICT_VALUE(moduledict_models$unet3d$losses, (Nuitka_StringObject *)mod_consts[2]); - - if (unlikely(tmp_called_name_2 == NULL)) { - tmp_called_name_2 = GET_MODULE_VARIABLE_VALUE_FALLBACK(mod_consts[2]); - } - - if (tmp_called_name_2 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 26; - type_description_1 = "oooooo"; - goto frame_exception_exit_1; - } - if (par_target == NULL) { - - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[4]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - exception_lineno = 26; - type_description_1 = "oooooo"; - goto frame_exception_exit_1; - } - - tmp_args_element_name_2 = par_target; - frame_ad5336bf04811a8c76dcc0c2c51b6074->m_frame.f_lineno = 26; - tmp_assign_source_2 = CALL_FUNCTION_WITH_SINGLE_ARG(tmp_called_name_2, tmp_args_element_name_2); - if (tmp_assign_source_2 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 26; - type_description_1 = "oooooo"; - goto frame_exception_exit_1; - } - { - PyObject *old = par_target; - par_target = tmp_assign_source_2; - Py_XDECREF(old); - } - - } - { - PyObject *tmp_assign_source_3; - PyObject *tmp_called_instance_3; - CHECK_OBJECT(par_target); - tmp_called_instance_3 = par_target; - frame_ad5336bf04811a8c76dcc0c2c51b6074->m_frame.f_lineno = 27; - tmp_assign_source_3 = CALL_METHOD_NO_ARGS(tmp_called_instance_3, mod_consts[5]); - if (tmp_assign_source_3 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 27; - type_description_1 = "oooooo"; - goto frame_exception_exit_1; - } - { - PyObject *old = par_target; - par_target = tmp_assign_source_3; - Py_XDECREF(old); - } - - } - { - PyObject *tmp_assign_source_4; - PyObject *tmp_called_instance_4; - PyObject *tmp_left_name_1; - PyObject *tmp_right_name_1; - CHECK_OBJECT(par_input); - tmp_left_name_1 = par_input; - CHECK_OBJECT(par_target); - tmp_right_name_1 = par_target; - tmp_called_instance_4 = BINARY_OPERATION_MULT_OBJECT_OBJECT_OBJECT(tmp_left_name_1, tmp_right_name_1); - if (tmp_called_instance_4 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 30; - type_description_1 = "oooooo"; - goto frame_exception_exit_1; - } - frame_ad5336bf04811a8c76dcc0c2c51b6074->m_frame.f_lineno = 30; - tmp_assign_source_4 = CALL_METHOD_WITH_ARGS1( - tmp_called_instance_4, - mod_consts[6], - &PyTuple_GET_ITEM(mod_consts[7], 0) - ); - - Py_DECREF(tmp_called_instance_4); - if (tmp_assign_source_4 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 30; - type_description_1 = "oooooo"; - goto frame_exception_exit_1; - } - assert(var_intersect == NULL); - var_intersect = tmp_assign_source_4; - } - { - bool tmp_condition_result_2; - PyObject *tmp_compexpr_left_2; - PyObject *tmp_compexpr_right_2; - CHECK_OBJECT(par_weight); - tmp_compexpr_left_2 = par_weight; - tmp_compexpr_right_2 = Py_None; - tmp_condition_result_2 = (tmp_compexpr_left_2 != tmp_compexpr_right_2) ? true : false; - if (tmp_condition_result_2 != false) { - goto branch_yes_2; - } else { - goto branch_no_2; - } - } - branch_yes_2:; - { - PyObject *tmp_assign_source_5; - PyObject *tmp_left_name_2; - PyObject *tmp_right_name_2; - CHECK_OBJECT(par_weight); - tmp_left_name_2 = par_weight; - CHECK_OBJECT(var_intersect); - tmp_right_name_2 = var_intersect; - tmp_assign_source_5 = BINARY_OPERATION_MULT_OBJECT_OBJECT_OBJECT(tmp_left_name_2, tmp_right_name_2); - if (tmp_assign_source_5 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 32; - type_description_1 = "oooooo"; - goto frame_exception_exit_1; - } - { - PyObject *old = var_intersect; - var_intersect = tmp_assign_source_5; - Py_XDECREF(old); - } - - } - branch_no_2:; - { - PyObject *tmp_assign_source_6; - PyObject *tmp_left_name_3; - PyObject *tmp_called_instance_5; - PyObject *tmp_left_name_4; - PyObject *tmp_right_name_3; - PyObject *tmp_right_name_4; - PyObject *tmp_called_instance_6; - PyObject *tmp_left_name_5; - PyObject *tmp_right_name_5; - if (par_input == NULL) { - - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[3]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - exception_lineno = 35; - type_description_1 = "oooooo"; - goto frame_exception_exit_1; - } - - tmp_left_name_4 = par_input; - if (par_input == NULL) { - - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[3]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - exception_lineno = 35; - type_description_1 = "oooooo"; - goto frame_exception_exit_1; - } - - tmp_right_name_3 = par_input; - tmp_called_instance_5 = BINARY_OPERATION_MULT_OBJECT_OBJECT_OBJECT(tmp_left_name_4, tmp_right_name_3); - if (tmp_called_instance_5 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 35; - type_description_1 = "oooooo"; - goto frame_exception_exit_1; - } - frame_ad5336bf04811a8c76dcc0c2c51b6074->m_frame.f_lineno = 35; - tmp_left_name_3 = CALL_METHOD_WITH_ARGS1( - tmp_called_instance_5, - mod_consts[6], - &PyTuple_GET_ITEM(mod_consts[7], 0) - ); - - Py_DECREF(tmp_called_instance_5); - if (tmp_left_name_3 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 35; - type_description_1 = "oooooo"; - goto frame_exception_exit_1; - } - if (par_target == NULL) { - Py_DECREF(tmp_left_name_3); - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[4]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - exception_lineno = 35; - type_description_1 = "oooooo"; - goto frame_exception_exit_1; - } - - tmp_left_name_5 = par_target; - if (par_target == NULL) { - Py_DECREF(tmp_left_name_3); - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[4]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - exception_lineno = 35; - type_description_1 = "oooooo"; - goto frame_exception_exit_1; - } - - tmp_right_name_5 = par_target; - tmp_called_instance_6 = BINARY_OPERATION_MULT_OBJECT_OBJECT_OBJECT(tmp_left_name_5, tmp_right_name_5); - if (tmp_called_instance_6 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - Py_DECREF(tmp_left_name_3); - - exception_lineno = 35; - type_description_1 = "oooooo"; - goto frame_exception_exit_1; - } - frame_ad5336bf04811a8c76dcc0c2c51b6074->m_frame.f_lineno = 35; - tmp_right_name_4 = CALL_METHOD_WITH_ARGS1( - tmp_called_instance_6, - mod_consts[6], - &PyTuple_GET_ITEM(mod_consts[7], 0) - ); - - Py_DECREF(tmp_called_instance_6); - if (tmp_right_name_4 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - Py_DECREF(tmp_left_name_3); - - exception_lineno = 35; - type_description_1 = "oooooo"; - goto frame_exception_exit_1; - } - tmp_assign_source_6 = BINARY_OPERATION_ADD_OBJECT_OBJECT_OBJECT(tmp_left_name_3, tmp_right_name_4); - Py_DECREF(tmp_left_name_3); - Py_DECREF(tmp_right_name_4); - if (tmp_assign_source_6 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 35; - type_description_1 = "oooooo"; - goto frame_exception_exit_1; - } - assert(var_denominator == NULL); - var_denominator = tmp_assign_source_6; - } - { - PyObject *tmp_left_name_6; - PyObject *tmp_right_name_6; - PyObject *tmp_left_name_7; - PyObject *tmp_right_name_7; - PyObject *tmp_called_name_3; - PyObject *tmp_expression_name_1; - PyObject *tmp_kwargs_name_1; - PyObject *tmp_dict_key_1; - PyObject *tmp_dict_value_1; - tmp_left_name_6 = mod_consts[8]; - CHECK_OBJECT(var_intersect); - tmp_left_name_7 = var_intersect; - CHECK_OBJECT(var_denominator); - tmp_expression_name_1 = var_denominator; - tmp_called_name_3 = LOOKUP_ATTRIBUTE(tmp_expression_name_1, mod_consts[9]); - if (tmp_called_name_3 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 36; - type_description_1 = "oooooo"; - goto frame_exception_exit_1; - } - tmp_dict_key_1 = mod_consts[10]; - CHECK_OBJECT(par_epsilon); - tmp_dict_value_1 = par_epsilon; - tmp_kwargs_name_1 = _PyDict_NewPresized( 1 ); - tmp_res = PyDict_SetItem(tmp_kwargs_name_1, tmp_dict_key_1, tmp_dict_value_1); - assert(!(tmp_res != 0)); - frame_ad5336bf04811a8c76dcc0c2c51b6074->m_frame.f_lineno = 36; - tmp_right_name_7 = CALL_FUNCTION_WITH_KEYARGS(tmp_called_name_3, tmp_kwargs_name_1); - Py_DECREF(tmp_called_name_3); - Py_DECREF(tmp_kwargs_name_1); - if (tmp_right_name_7 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 36; - type_description_1 = "oooooo"; - goto frame_exception_exit_1; - } - tmp_right_name_6 = BINARY_OPERATION_TRUEDIV_OBJECT_OBJECT_OBJECT(tmp_left_name_7, tmp_right_name_7); - Py_DECREF(tmp_right_name_7); - if (tmp_right_name_6 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 36; - type_description_1 = "oooooo"; - goto frame_exception_exit_1; - } - tmp_return_value = BINARY_OPERATION_MULT_OBJECT_LONG_OBJECT(tmp_left_name_6, tmp_right_name_6); - Py_DECREF(tmp_right_name_6); - if (tmp_return_value == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 36; - type_description_1 = "oooooo"; - goto frame_exception_exit_1; - } - goto frame_return_exit_1; - } - -#if 0 - RESTORE_FRAME_EXCEPTION(frame_ad5336bf04811a8c76dcc0c2c51b6074); -#endif - - // Put the previous frame back on top. - popFrameStack(); - - goto frame_no_exception_1; - - frame_return_exit_1:; -#if 0 - RESTORE_FRAME_EXCEPTION(frame_ad5336bf04811a8c76dcc0c2c51b6074); -#endif - - // Put the previous frame back on top. - popFrameStack(); - - goto try_return_handler_1; - - frame_exception_exit_1:; - -#if 0 - RESTORE_FRAME_EXCEPTION(frame_ad5336bf04811a8c76dcc0c2c51b6074); -#endif - - if (exception_tb == NULL) { - exception_tb = MAKE_TRACEBACK(frame_ad5336bf04811a8c76dcc0c2c51b6074, exception_lineno); - } else if (exception_tb->tb_frame != &frame_ad5336bf04811a8c76dcc0c2c51b6074->m_frame) { - exception_tb = ADD_TRACEBACK(exception_tb, frame_ad5336bf04811a8c76dcc0c2c51b6074, exception_lineno); - } - - // Attaches locals to frame if any. - Nuitka_Frame_AttachLocals( - frame_ad5336bf04811a8c76dcc0c2c51b6074, - type_description_1, - par_input, - par_target, - par_epsilon, - par_weight, - var_intersect, - var_denominator - ); - - - // Release cached frame if used for exception. - if (frame_ad5336bf04811a8c76dcc0c2c51b6074 == cache_frame_ad5336bf04811a8c76dcc0c2c51b6074) { -#if _DEBUG_REFCOUNTS - count_active_frame_cache_instances -= 1; - count_released_frame_cache_instances += 1; -#endif - - Py_DECREF(cache_frame_ad5336bf04811a8c76dcc0c2c51b6074); - cache_frame_ad5336bf04811a8c76dcc0c2c51b6074 = NULL; - } - - assertFrameObject(frame_ad5336bf04811a8c76dcc0c2c51b6074); - - // Put the previous frame back on top. - popFrameStack(); - - // Return the error. - goto try_except_handler_1; - - frame_no_exception_1:; - NUITKA_CANNOT_GET_HERE("tried codes exits in all cases"); - return NULL; - // Return handler code: - try_return_handler_1:; - Py_XDECREF(par_input); - par_input = NULL; - Py_XDECREF(par_target); - par_target = NULL; - Py_XDECREF(par_epsilon); - par_epsilon = NULL; - Py_XDECREF(par_weight); - par_weight = NULL; - Py_XDECREF(var_intersect); - var_intersect = NULL; - Py_XDECREF(var_denominator); - var_denominator = NULL; - goto function_return_exit; - // Exception handler code: - try_except_handler_1:; - exception_keeper_type_1 = exception_type; - exception_keeper_value_1 = exception_value; - exception_keeper_tb_1 = exception_tb; - exception_keeper_lineno_1 = exception_lineno; - exception_type = NULL; - exception_value = NULL; - exception_tb = NULL; - exception_lineno = 0; - - Py_XDECREF(par_input); - par_input = NULL; - Py_XDECREF(par_target); - par_target = NULL; - Py_XDECREF(par_epsilon); - par_epsilon = NULL; - Py_XDECREF(par_weight); - par_weight = NULL; - Py_XDECREF(var_intersect); - var_intersect = NULL; - Py_XDECREF(var_denominator); - var_denominator = NULL; - // Re-raise. - exception_type = exception_keeper_type_1; - exception_value = exception_keeper_value_1; - exception_tb = exception_keeper_tb_1; - exception_lineno = exception_keeper_lineno_1; - - goto function_exception_exit; - // End of try: - - NUITKA_CANNOT_GET_HERE("Return statement must have exited already."); - return NULL; - -function_exception_exit: - assert(exception_type); - RESTORE_ERROR_OCCURRED(exception_type, exception_value, exception_tb); - - return NULL; - -function_return_exit: - // Function cleanup code if any. - - - // Actual function exit with return value, making sure we did not make - // the error status worse despite non-NULL return. - CHECK_OBJECT(tmp_return_value); - assert(had_error || !ERROR_OCCURRED()); - return tmp_return_value; -} - - -static PyObject *impl_models$unet3d$losses$$$function__2___init__(struct Nuitka_FunctionObject const *self, PyObject **python_pars) { - // Preserve error status for checks -#ifndef __NUITKA_NO_ASSERT__ - NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED(); -#endif - - // Local variable declarations. - PyObject *par_self = python_pars[0]; - PyObject *par_loss = python_pars[1]; - PyObject *par_ignore_index = python_pars[2]; - struct Nuitka_FrameObject *frame_4eb47512d57f9eb20a1993d6d1c3fb78; - NUITKA_MAY_BE_UNUSED char const *type_description_1 = NULL; - NUITKA_MAY_BE_UNUSED nuitka_void tmp_unused; - PyObject *exception_type = NULL; - PyObject *exception_value = NULL; - PyTracebackObject *exception_tb = NULL; - NUITKA_MAY_BE_UNUSED int exception_lineno = 0; - bool tmp_result; - static struct Nuitka_FrameObject *cache_frame_4eb47512d57f9eb20a1993d6d1c3fb78 = NULL; - PyObject *tmp_return_value = NULL; - PyObject *exception_keeper_type_1; - PyObject *exception_keeper_value_1; - PyTracebackObject *exception_keeper_tb_1; - NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_1; - - // Actual function body. - // Tried code: - if (isFrameUnusable(cache_frame_4eb47512d57f9eb20a1993d6d1c3fb78)) { - Py_XDECREF(cache_frame_4eb47512d57f9eb20a1993d6d1c3fb78); - -#if _DEBUG_REFCOUNTS - if (cache_frame_4eb47512d57f9eb20a1993d6d1c3fb78 == NULL) { - count_active_frame_cache_instances += 1; - } else { - count_released_frame_cache_instances += 1; - } - count_allocated_frame_cache_instances += 1; -#endif - cache_frame_4eb47512d57f9eb20a1993d6d1c3fb78 = MAKE_FUNCTION_FRAME(codeobj_4eb47512d57f9eb20a1993d6d1c3fb78, module_models$unet3d$losses, sizeof(void *)+sizeof(void *)+sizeof(void *)+sizeof(void *)); -#if _DEBUG_REFCOUNTS - } else { - count_hit_frame_cache_instances += 1; -#endif - } - assert(cache_frame_4eb47512d57f9eb20a1993d6d1c3fb78->m_type_description == NULL); - frame_4eb47512d57f9eb20a1993d6d1c3fb78 = cache_frame_4eb47512d57f9eb20a1993d6d1c3fb78; - - // Push the new frame as the currently active one. - pushFrameStack(frame_4eb47512d57f9eb20a1993d6d1c3fb78); - - // Mark the frame object as in use, ref count 1 will be up for reuse. - assert(Py_REFCNT(frame_4eb47512d57f9eb20a1993d6d1c3fb78) == 2); // Frame stack - - // Framed code: - { - PyObject *tmp_called_instance_1; - PyObject *tmp_type_arg_name_1; - PyObject *tmp_object_arg_name_1; - PyObject *tmp_call_result_1; - tmp_type_arg_name_1 = GET_STRING_DICT_VALUE(moduledict_models$unet3d$losses, (Nuitka_StringObject *)mod_consts[12]); - - if (unlikely(tmp_type_arg_name_1 == NULL)) { - tmp_type_arg_name_1 = GET_MODULE_VARIABLE_VALUE_FALLBACK(mod_consts[12]); - } - - if (tmp_type_arg_name_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 45; - type_description_1 = "oooN"; - goto frame_exception_exit_1; - } - CHECK_OBJECT(par_self); - tmp_object_arg_name_1 = par_self; - tmp_called_instance_1 = BUILTIN_SUPER2(tmp_type_arg_name_1, tmp_object_arg_name_1); - if (tmp_called_instance_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 45; - type_description_1 = "oooN"; - goto frame_exception_exit_1; - } - frame_4eb47512d57f9eb20a1993d6d1c3fb78->m_frame.f_lineno = 45; - tmp_call_result_1 = CALL_METHOD_NO_ARGS(tmp_called_instance_1, mod_consts[13]); - Py_DECREF(tmp_called_instance_1); - if (tmp_call_result_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 45; - type_description_1 = "oooN"; - goto frame_exception_exit_1; - } - Py_DECREF(tmp_call_result_1); - } - { - bool tmp_condition_result_1; - PyObject *tmp_compexpr_left_1; - PyObject *tmp_compexpr_right_1; - CHECK_OBJECT(par_ignore_index); - tmp_compexpr_left_1 = par_ignore_index; - tmp_compexpr_right_1 = Py_None; - tmp_condition_result_1 = (tmp_compexpr_left_1 == tmp_compexpr_right_1) ? true : false; - if (tmp_condition_result_1 != false) { - goto branch_yes_1; - } else { - goto branch_no_1; - } - } - branch_yes_1:; - { - PyObject *tmp_raise_type_1; - PyObject *tmp_raise_value_1; - tmp_raise_type_1 = PyExc_AssertionError; - tmp_raise_value_1 = mod_consts[14]; - exception_type = tmp_raise_type_1; - Py_INCREF(tmp_raise_type_1); - exception_value = tmp_raise_value_1; - Py_INCREF(tmp_raise_value_1); - exception_lineno = 46; - RAISE_EXCEPTION_WITH_VALUE(&exception_type, &exception_value, &exception_tb); - type_description_1 = "oooN"; - goto frame_exception_exit_1; - } - branch_no_1:; - { - PyObject *tmp_assattr_name_1; - PyObject *tmp_assattr_target_1; - CHECK_OBJECT(par_loss); - tmp_assattr_name_1 = par_loss; - CHECK_OBJECT(par_self); - tmp_assattr_target_1 = par_self; - tmp_result = SET_ATTRIBUTE(tmp_assattr_target_1, mod_consts[15], tmp_assattr_name_1); - if (tmp_result == false) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 47; - type_description_1 = "oooN"; - goto frame_exception_exit_1; - } - } - { - PyObject *tmp_assattr_name_2; - PyObject *tmp_assattr_target_2; - CHECK_OBJECT(par_ignore_index); - tmp_assattr_name_2 = par_ignore_index; - CHECK_OBJECT(par_self); - tmp_assattr_target_2 = par_self; - tmp_result = SET_ATTRIBUTE(tmp_assattr_target_2, mod_consts[16], tmp_assattr_name_2); - if (tmp_result == false) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 48; - type_description_1 = "oooN"; - goto frame_exception_exit_1; - } - } - -#if 0 - RESTORE_FRAME_EXCEPTION(frame_4eb47512d57f9eb20a1993d6d1c3fb78); -#endif - - // Put the previous frame back on top. - popFrameStack(); - - goto frame_no_exception_1; - - frame_exception_exit_1:; - -#if 0 - RESTORE_FRAME_EXCEPTION(frame_4eb47512d57f9eb20a1993d6d1c3fb78); -#endif - - if (exception_tb == NULL) { - exception_tb = MAKE_TRACEBACK(frame_4eb47512d57f9eb20a1993d6d1c3fb78, exception_lineno); - } else if (exception_tb->tb_frame != &frame_4eb47512d57f9eb20a1993d6d1c3fb78->m_frame) { - exception_tb = ADD_TRACEBACK(exception_tb, frame_4eb47512d57f9eb20a1993d6d1c3fb78, exception_lineno); - } - - // Attaches locals to frame if any. - Nuitka_Frame_AttachLocals( - frame_4eb47512d57f9eb20a1993d6d1c3fb78, - type_description_1, - par_self, - par_loss, - par_ignore_index, - NULL - ); - - - // Release cached frame if used for exception. - if (frame_4eb47512d57f9eb20a1993d6d1c3fb78 == cache_frame_4eb47512d57f9eb20a1993d6d1c3fb78) { -#if _DEBUG_REFCOUNTS - count_active_frame_cache_instances -= 1; - count_released_frame_cache_instances += 1; -#endif - - Py_DECREF(cache_frame_4eb47512d57f9eb20a1993d6d1c3fb78); - cache_frame_4eb47512d57f9eb20a1993d6d1c3fb78 = NULL; - } - - assertFrameObject(frame_4eb47512d57f9eb20a1993d6d1c3fb78); - - // Put the previous frame back on top. - popFrameStack(); - - // Return the error. - goto try_except_handler_1; - - frame_no_exception_1:; - tmp_return_value = Py_None; - Py_INCREF(tmp_return_value); - goto try_return_handler_1; - NUITKA_CANNOT_GET_HERE("tried codes exits in all cases"); - return NULL; - // Return handler code: - try_return_handler_1:; - CHECK_OBJECT(par_self); - Py_DECREF(par_self); - par_self = NULL; - CHECK_OBJECT(par_loss); - Py_DECREF(par_loss); - par_loss = NULL; - CHECK_OBJECT(par_ignore_index); - Py_DECREF(par_ignore_index); - par_ignore_index = NULL; - goto function_return_exit; - // Exception handler code: - try_except_handler_1:; - exception_keeper_type_1 = exception_type; - exception_keeper_value_1 = exception_value; - exception_keeper_tb_1 = exception_tb; - exception_keeper_lineno_1 = exception_lineno; - exception_type = NULL; - exception_value = NULL; - exception_tb = NULL; - exception_lineno = 0; - - CHECK_OBJECT(par_self); - Py_DECREF(par_self); - par_self = NULL; - CHECK_OBJECT(par_loss); - Py_DECREF(par_loss); - par_loss = NULL; - CHECK_OBJECT(par_ignore_index); - Py_DECREF(par_ignore_index); - par_ignore_index = NULL; - // Re-raise. - exception_type = exception_keeper_type_1; - exception_value = exception_keeper_value_1; - exception_tb = exception_keeper_tb_1; - exception_lineno = exception_keeper_lineno_1; - - goto function_exception_exit; - // End of try: - - NUITKA_CANNOT_GET_HERE("Return statement must have exited already."); - return NULL; - -function_exception_exit: - assert(exception_type); - RESTORE_ERROR_OCCURRED(exception_type, exception_value, exception_tb); - - return NULL; - -function_return_exit: - // Function cleanup code if any. - - - // Actual function exit with return value, making sure we did not make - // the error status worse despite non-NULL return. - CHECK_OBJECT(tmp_return_value); - assert(had_error || !ERROR_OCCURRED()); - return tmp_return_value; -} - - -static PyObject *impl_models$unet3d$losses$$$function__3_forward(struct Nuitka_FunctionObject const *self, PyObject **python_pars) { - // Preserve error status for checks -#ifndef __NUITKA_NO_ASSERT__ - NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED(); -#endif - - // Local variable declarations. - PyObject *par_self = python_pars[0]; - PyObject *par_input = python_pars[1]; - PyObject *par_target = python_pars[2]; - PyObject *var_mask = NULL; - struct Nuitka_FrameObject *frame_7e600e5abd5b883d8c3faab8d6f2a207; - NUITKA_MAY_BE_UNUSED char const *type_description_1 = NULL; - PyObject *exception_type = NULL; - PyObject *exception_value = NULL; - PyTracebackObject *exception_tb = NULL; - NUITKA_MAY_BE_UNUSED int exception_lineno = 0; - bool tmp_result; - PyObject *tmp_return_value = NULL; - static struct Nuitka_FrameObject *cache_frame_7e600e5abd5b883d8c3faab8d6f2a207 = NULL; - PyObject *exception_keeper_type_1; - PyObject *exception_keeper_value_1; - PyTracebackObject *exception_keeper_tb_1; - NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_1; - - // Actual function body. - // Tried code: - if (isFrameUnusable(cache_frame_7e600e5abd5b883d8c3faab8d6f2a207)) { - Py_XDECREF(cache_frame_7e600e5abd5b883d8c3faab8d6f2a207); - -#if _DEBUG_REFCOUNTS - if (cache_frame_7e600e5abd5b883d8c3faab8d6f2a207 == NULL) { - count_active_frame_cache_instances += 1; - } else { - count_released_frame_cache_instances += 1; - } - count_allocated_frame_cache_instances += 1; -#endif - cache_frame_7e600e5abd5b883d8c3faab8d6f2a207 = MAKE_FUNCTION_FRAME(codeobj_7e600e5abd5b883d8c3faab8d6f2a207, module_models$unet3d$losses, sizeof(void *)+sizeof(void *)+sizeof(void *)+sizeof(void *)); -#if _DEBUG_REFCOUNTS - } else { - count_hit_frame_cache_instances += 1; -#endif - } - assert(cache_frame_7e600e5abd5b883d8c3faab8d6f2a207->m_type_description == NULL); - frame_7e600e5abd5b883d8c3faab8d6f2a207 = cache_frame_7e600e5abd5b883d8c3faab8d6f2a207; - - // Push the new frame as the currently active one. - pushFrameStack(frame_7e600e5abd5b883d8c3faab8d6f2a207); - - // Mark the frame object as in use, ref count 1 will be up for reuse. - assert(Py_REFCNT(frame_7e600e5abd5b883d8c3faab8d6f2a207) == 2); // Frame stack - - // Framed code: - { - PyObject *tmp_assign_source_1; - PyObject *tmp_called_name_1; - PyObject *tmp_expression_name_1; - PyObject *tmp_called_instance_1; - PyObject *tmp_args_element_name_1; - PyObject *tmp_expression_name_2; - CHECK_OBJECT(par_target); - tmp_called_instance_1 = par_target; - frame_7e600e5abd5b883d8c3faab8d6f2a207->m_frame.f_lineno = 51; - tmp_expression_name_1 = CALL_METHOD_NO_ARGS(tmp_called_instance_1, mod_consts[17]); - if (tmp_expression_name_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 51; - type_description_1 = "oooo"; - goto frame_exception_exit_1; - } - tmp_called_name_1 = LOOKUP_ATTRIBUTE(tmp_expression_name_1, mod_consts[18]); - Py_DECREF(tmp_expression_name_1); - if (tmp_called_name_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 51; - type_description_1 = "oooo"; - goto frame_exception_exit_1; - } - CHECK_OBJECT(par_self); - tmp_expression_name_2 = par_self; - tmp_args_element_name_1 = LOOKUP_ATTRIBUTE(tmp_expression_name_2, mod_consts[16]); - if (tmp_args_element_name_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - Py_DECREF(tmp_called_name_1); - - exception_lineno = 51; - type_description_1 = "oooo"; - goto frame_exception_exit_1; - } - frame_7e600e5abd5b883d8c3faab8d6f2a207->m_frame.f_lineno = 51; - tmp_assign_source_1 = CALL_FUNCTION_WITH_SINGLE_ARG(tmp_called_name_1, tmp_args_element_name_1); - Py_DECREF(tmp_called_name_1); - Py_DECREF(tmp_args_element_name_1); - if (tmp_assign_source_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 51; - type_description_1 = "oooo"; - goto frame_exception_exit_1; - } - assert(var_mask == NULL); - var_mask = tmp_assign_source_1; - } - { - PyObject *tmp_assattr_name_1; - PyObject *tmp_assattr_target_1; - tmp_assattr_name_1 = Py_False; - CHECK_OBJECT(var_mask); - tmp_assattr_target_1 = var_mask; - tmp_result = SET_ATTRIBUTE(tmp_assattr_target_1, mod_consts[19], tmp_assattr_name_1); - if (tmp_result == false) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 52; - type_description_1 = "oooo"; - goto frame_exception_exit_1; - } - } - { - PyObject *tmp_assign_source_2; - PyObject *tmp_left_name_1; - PyObject *tmp_right_name_1; - CHECK_OBJECT(par_input); - tmp_left_name_1 = par_input; - CHECK_OBJECT(var_mask); - tmp_right_name_1 = var_mask; - tmp_assign_source_2 = BINARY_OPERATION_MULT_OBJECT_OBJECT_OBJECT(tmp_left_name_1, tmp_right_name_1); - if (tmp_assign_source_2 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 55; - type_description_1 = "oooo"; - goto frame_exception_exit_1; - } - { - PyObject *old = par_input; - par_input = tmp_assign_source_2; - Py_XDECREF(old); - } - - } - { - PyObject *tmp_assign_source_3; - PyObject *tmp_left_name_2; - PyObject *tmp_right_name_2; - if (par_target == NULL) { - - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[4]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - exception_lineno = 56; - type_description_1 = "oooo"; - goto frame_exception_exit_1; - } - - tmp_left_name_2 = par_target; - if (var_mask == NULL) { - - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[20]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - exception_lineno = 56; - type_description_1 = "oooo"; - goto frame_exception_exit_1; - } - - tmp_right_name_2 = var_mask; - tmp_assign_source_3 = BINARY_OPERATION_MULT_OBJECT_OBJECT_OBJECT(tmp_left_name_2, tmp_right_name_2); - if (tmp_assign_source_3 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 56; - type_description_1 = "oooo"; - goto frame_exception_exit_1; - } - { - PyObject *old = par_target; - par_target = tmp_assign_source_3; - Py_XDECREF(old); - } - - } - { - PyObject *tmp_called_instance_2; - PyObject *tmp_args_element_name_2; - PyObject *tmp_args_element_name_3; - if (par_self == NULL) { - - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[21]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - exception_lineno = 59; - type_description_1 = "oooo"; - goto frame_exception_exit_1; - } - - tmp_called_instance_2 = par_self; - CHECK_OBJECT(par_input); - tmp_args_element_name_2 = par_input; - CHECK_OBJECT(par_target); - tmp_args_element_name_3 = par_target; - frame_7e600e5abd5b883d8c3faab8d6f2a207->m_frame.f_lineno = 59; - { - PyObject *call_args[] = {tmp_args_element_name_2, tmp_args_element_name_3}; - tmp_return_value = CALL_METHOD_WITH_ARGS2( - tmp_called_instance_2, - mod_consts[15], - call_args - ); - } - - if (tmp_return_value == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 59; - type_description_1 = "oooo"; - goto frame_exception_exit_1; - } - goto frame_return_exit_1; - } - -#if 0 - RESTORE_FRAME_EXCEPTION(frame_7e600e5abd5b883d8c3faab8d6f2a207); -#endif - - // Put the previous frame back on top. - popFrameStack(); - - goto frame_no_exception_1; - - frame_return_exit_1:; -#if 0 - RESTORE_FRAME_EXCEPTION(frame_7e600e5abd5b883d8c3faab8d6f2a207); -#endif - - // Put the previous frame back on top. - popFrameStack(); - - goto try_return_handler_1; - - frame_exception_exit_1:; - -#if 0 - RESTORE_FRAME_EXCEPTION(frame_7e600e5abd5b883d8c3faab8d6f2a207); -#endif - - if (exception_tb == NULL) { - exception_tb = MAKE_TRACEBACK(frame_7e600e5abd5b883d8c3faab8d6f2a207, exception_lineno); - } else if (exception_tb->tb_frame != &frame_7e600e5abd5b883d8c3faab8d6f2a207->m_frame) { - exception_tb = ADD_TRACEBACK(exception_tb, frame_7e600e5abd5b883d8c3faab8d6f2a207, exception_lineno); - } - - // Attaches locals to frame if any. - Nuitka_Frame_AttachLocals( - frame_7e600e5abd5b883d8c3faab8d6f2a207, - type_description_1, - par_self, - par_input, - par_target, - var_mask - ); - - - // Release cached frame if used for exception. - if (frame_7e600e5abd5b883d8c3faab8d6f2a207 == cache_frame_7e600e5abd5b883d8c3faab8d6f2a207) { -#if _DEBUG_REFCOUNTS - count_active_frame_cache_instances -= 1; - count_released_frame_cache_instances += 1; -#endif - - Py_DECREF(cache_frame_7e600e5abd5b883d8c3faab8d6f2a207); - cache_frame_7e600e5abd5b883d8c3faab8d6f2a207 = NULL; - } - - assertFrameObject(frame_7e600e5abd5b883d8c3faab8d6f2a207); - - // Put the previous frame back on top. - popFrameStack(); - - // Return the error. - goto try_except_handler_1; - - frame_no_exception_1:; - NUITKA_CANNOT_GET_HERE("tried codes exits in all cases"); - return NULL; - // Return handler code: - try_return_handler_1:; - Py_XDECREF(par_self); - par_self = NULL; - Py_XDECREF(par_input); - par_input = NULL; - Py_XDECREF(par_target); - par_target = NULL; - Py_XDECREF(var_mask); - var_mask = NULL; - goto function_return_exit; - // Exception handler code: - try_except_handler_1:; - exception_keeper_type_1 = exception_type; - exception_keeper_value_1 = exception_value; - exception_keeper_tb_1 = exception_tb; - exception_keeper_lineno_1 = exception_lineno; - exception_type = NULL; - exception_value = NULL; - exception_tb = NULL; - exception_lineno = 0; - - Py_XDECREF(par_self); - par_self = NULL; - Py_XDECREF(par_input); - par_input = NULL; - Py_XDECREF(par_target); - par_target = NULL; - Py_XDECREF(var_mask); - var_mask = NULL; - // Re-raise. - exception_type = exception_keeper_type_1; - exception_value = exception_keeper_value_1; - exception_tb = exception_keeper_tb_1; - exception_lineno = exception_keeper_lineno_1; - - goto function_exception_exit; - // End of try: - - NUITKA_CANNOT_GET_HERE("Return statement must have exited already."); - return NULL; - -function_exception_exit: - assert(exception_type); - RESTORE_ERROR_OCCURRED(exception_type, exception_value, exception_tb); - - return NULL; - -function_return_exit: - // Function cleanup code if any. - - - // Actual function exit with return value, making sure we did not make - // the error status worse despite non-NULL return. - CHECK_OBJECT(tmp_return_value); - assert(had_error || !ERROR_OCCURRED()); - return tmp_return_value; -} - - -static PyObject *impl_models$unet3d$losses$$$function__4___init__(struct Nuitka_FunctionObject const *self, PyObject **python_pars) { - // Preserve error status for checks -#ifndef __NUITKA_NO_ASSERT__ - NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED(); -#endif - - // Local variable declarations. - PyObject *par_self = python_pars[0]; - PyObject *par_loss = python_pars[1]; - PyObject *par_squeeze_channel = python_pars[2]; - struct Nuitka_FrameObject *frame_7fca07fbabf40b9aedb62b82b03ac314; - NUITKA_MAY_BE_UNUSED char const *type_description_1 = NULL; - NUITKA_MAY_BE_UNUSED nuitka_void tmp_unused; - PyObject *exception_type = NULL; - PyObject *exception_value = NULL; - PyTracebackObject *exception_tb = NULL; - NUITKA_MAY_BE_UNUSED int exception_lineno = 0; - bool tmp_result; - static struct Nuitka_FrameObject *cache_frame_7fca07fbabf40b9aedb62b82b03ac314 = NULL; - PyObject *tmp_return_value = NULL; - PyObject *exception_keeper_type_1; - PyObject *exception_keeper_value_1; - PyTracebackObject *exception_keeper_tb_1; - NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_1; - - // Actual function body. - // Tried code: - if (isFrameUnusable(cache_frame_7fca07fbabf40b9aedb62b82b03ac314)) { - Py_XDECREF(cache_frame_7fca07fbabf40b9aedb62b82b03ac314); - -#if _DEBUG_REFCOUNTS - if (cache_frame_7fca07fbabf40b9aedb62b82b03ac314 == NULL) { - count_active_frame_cache_instances += 1; - } else { - count_released_frame_cache_instances += 1; - } - count_allocated_frame_cache_instances += 1; -#endif - cache_frame_7fca07fbabf40b9aedb62b82b03ac314 = MAKE_FUNCTION_FRAME(codeobj_7fca07fbabf40b9aedb62b82b03ac314, module_models$unet3d$losses, sizeof(void *)+sizeof(void *)+sizeof(void *)+sizeof(void *)); -#if _DEBUG_REFCOUNTS - } else { - count_hit_frame_cache_instances += 1; -#endif - } - assert(cache_frame_7fca07fbabf40b9aedb62b82b03ac314->m_type_description == NULL); - frame_7fca07fbabf40b9aedb62b82b03ac314 = cache_frame_7fca07fbabf40b9aedb62b82b03ac314; - - // Push the new frame as the currently active one. - pushFrameStack(frame_7fca07fbabf40b9aedb62b82b03ac314); - - // Mark the frame object as in use, ref count 1 will be up for reuse. - assert(Py_REFCNT(frame_7fca07fbabf40b9aedb62b82b03ac314) == 2); // Frame stack - - // Framed code: - { - PyObject *tmp_called_instance_1; - PyObject *tmp_type_arg_name_1; - PyObject *tmp_object_arg_name_1; - PyObject *tmp_call_result_1; - tmp_type_arg_name_1 = GET_STRING_DICT_VALUE(moduledict_models$unet3d$losses, (Nuitka_StringObject *)mod_consts[22]); - - if (unlikely(tmp_type_arg_name_1 == NULL)) { - tmp_type_arg_name_1 = GET_MODULE_VARIABLE_VALUE_FALLBACK(mod_consts[22]); - } - - if (tmp_type_arg_name_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 68; - type_description_1 = "oooN"; - goto frame_exception_exit_1; - } - CHECK_OBJECT(par_self); - tmp_object_arg_name_1 = par_self; - tmp_called_instance_1 = BUILTIN_SUPER2(tmp_type_arg_name_1, tmp_object_arg_name_1); - if (tmp_called_instance_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 68; - type_description_1 = "oooN"; - goto frame_exception_exit_1; - } - frame_7fca07fbabf40b9aedb62b82b03ac314->m_frame.f_lineno = 68; - tmp_call_result_1 = CALL_METHOD_NO_ARGS(tmp_called_instance_1, mod_consts[13]); - Py_DECREF(tmp_called_instance_1); - if (tmp_call_result_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 68; - type_description_1 = "oooN"; - goto frame_exception_exit_1; - } - Py_DECREF(tmp_call_result_1); - } - { - PyObject *tmp_assattr_name_1; - PyObject *tmp_assattr_target_1; - CHECK_OBJECT(par_loss); - tmp_assattr_name_1 = par_loss; - CHECK_OBJECT(par_self); - tmp_assattr_target_1 = par_self; - tmp_result = SET_ATTRIBUTE(tmp_assattr_target_1, mod_consts[15], tmp_assattr_name_1); - if (tmp_result == false) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 69; - type_description_1 = "oooN"; - goto frame_exception_exit_1; - } - } - { - PyObject *tmp_assattr_name_2; - PyObject *tmp_assattr_target_2; - CHECK_OBJECT(par_squeeze_channel); - tmp_assattr_name_2 = par_squeeze_channel; - CHECK_OBJECT(par_self); - tmp_assattr_target_2 = par_self; - tmp_result = SET_ATTRIBUTE(tmp_assattr_target_2, mod_consts[23], tmp_assattr_name_2); - if (tmp_result == false) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 70; - type_description_1 = "oooN"; - goto frame_exception_exit_1; - } - } - -#if 0 - RESTORE_FRAME_EXCEPTION(frame_7fca07fbabf40b9aedb62b82b03ac314); -#endif - - // Put the previous frame back on top. - popFrameStack(); - - goto frame_no_exception_1; - - frame_exception_exit_1:; - -#if 0 - RESTORE_FRAME_EXCEPTION(frame_7fca07fbabf40b9aedb62b82b03ac314); -#endif - - if (exception_tb == NULL) { - exception_tb = MAKE_TRACEBACK(frame_7fca07fbabf40b9aedb62b82b03ac314, exception_lineno); - } else if (exception_tb->tb_frame != &frame_7fca07fbabf40b9aedb62b82b03ac314->m_frame) { - exception_tb = ADD_TRACEBACK(exception_tb, frame_7fca07fbabf40b9aedb62b82b03ac314, exception_lineno); - } - - // Attaches locals to frame if any. - Nuitka_Frame_AttachLocals( - frame_7fca07fbabf40b9aedb62b82b03ac314, - type_description_1, - par_self, - par_loss, - par_squeeze_channel, - NULL - ); - - - // Release cached frame if used for exception. - if (frame_7fca07fbabf40b9aedb62b82b03ac314 == cache_frame_7fca07fbabf40b9aedb62b82b03ac314) { -#if _DEBUG_REFCOUNTS - count_active_frame_cache_instances -= 1; - count_released_frame_cache_instances += 1; -#endif - - Py_DECREF(cache_frame_7fca07fbabf40b9aedb62b82b03ac314); - cache_frame_7fca07fbabf40b9aedb62b82b03ac314 = NULL; - } - - assertFrameObject(frame_7fca07fbabf40b9aedb62b82b03ac314); - - // Put the previous frame back on top. - popFrameStack(); - - // Return the error. - goto try_except_handler_1; - - frame_no_exception_1:; - tmp_return_value = Py_None; - Py_INCREF(tmp_return_value); - goto try_return_handler_1; - NUITKA_CANNOT_GET_HERE("tried codes exits in all cases"); - return NULL; - // Return handler code: - try_return_handler_1:; - CHECK_OBJECT(par_self); - Py_DECREF(par_self); - par_self = NULL; - CHECK_OBJECT(par_loss); - Py_DECREF(par_loss); - par_loss = NULL; - CHECK_OBJECT(par_squeeze_channel); - Py_DECREF(par_squeeze_channel); - par_squeeze_channel = NULL; - goto function_return_exit; - // Exception handler code: - try_except_handler_1:; - exception_keeper_type_1 = exception_type; - exception_keeper_value_1 = exception_value; - exception_keeper_tb_1 = exception_tb; - exception_keeper_lineno_1 = exception_lineno; - exception_type = NULL; - exception_value = NULL; - exception_tb = NULL; - exception_lineno = 0; - - CHECK_OBJECT(par_self); - Py_DECREF(par_self); - par_self = NULL; - CHECK_OBJECT(par_loss); - Py_DECREF(par_loss); - par_loss = NULL; - CHECK_OBJECT(par_squeeze_channel); - Py_DECREF(par_squeeze_channel); - par_squeeze_channel = NULL; - // Re-raise. - exception_type = exception_keeper_type_1; - exception_value = exception_keeper_value_1; - exception_tb = exception_keeper_tb_1; - exception_lineno = exception_keeper_lineno_1; - - goto function_exception_exit; - // End of try: - - NUITKA_CANNOT_GET_HERE("Return statement must have exited already."); - return NULL; - -function_exception_exit: - assert(exception_type); - RESTORE_ERROR_OCCURRED(exception_type, exception_value, exception_tb); - - return NULL; - -function_return_exit: - // Function cleanup code if any. - - - // Actual function exit with return value, making sure we did not make - // the error status worse despite non-NULL return. - CHECK_OBJECT(tmp_return_value); - assert(had_error || !ERROR_OCCURRED()); - return tmp_return_value; -} - - -static PyObject *impl_models$unet3d$losses$$$function__5_forward(struct Nuitka_FunctionObject const *self, PyObject **python_pars) { - // Preserve error status for checks -#ifndef __NUITKA_NO_ASSERT__ - NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED(); -#endif - - // Local variable declarations. - PyObject *par_self = python_pars[0]; - PyObject *par_input = python_pars[1]; - PyObject *par_target = python_pars[2]; - struct Nuitka_FrameObject *frame_df030e46b619f2e1d7bbe1bf22d15c8c; - NUITKA_MAY_BE_UNUSED char const *type_description_1 = NULL; - PyObject *exception_type = NULL; - PyObject *exception_value = NULL; - PyTracebackObject *exception_tb = NULL; - NUITKA_MAY_BE_UNUSED int exception_lineno = 0; - int tmp_res; - PyObject *tmp_return_value = NULL; - static struct Nuitka_FrameObject *cache_frame_df030e46b619f2e1d7bbe1bf22d15c8c = NULL; - PyObject *exception_keeper_type_1; - PyObject *exception_keeper_value_1; - PyTracebackObject *exception_keeper_tb_1; - NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_1; - - // Actual function body. - // Tried code: - if (isFrameUnusable(cache_frame_df030e46b619f2e1d7bbe1bf22d15c8c)) { - Py_XDECREF(cache_frame_df030e46b619f2e1d7bbe1bf22d15c8c); - -#if _DEBUG_REFCOUNTS - if (cache_frame_df030e46b619f2e1d7bbe1bf22d15c8c == NULL) { - count_active_frame_cache_instances += 1; - } else { - count_released_frame_cache_instances += 1; - } - count_allocated_frame_cache_instances += 1; -#endif - cache_frame_df030e46b619f2e1d7bbe1bf22d15c8c = MAKE_FUNCTION_FRAME(codeobj_df030e46b619f2e1d7bbe1bf22d15c8c, module_models$unet3d$losses, sizeof(void *)+sizeof(void *)+sizeof(void *)); -#if _DEBUG_REFCOUNTS - } else { - count_hit_frame_cache_instances += 1; -#endif - } - assert(cache_frame_df030e46b619f2e1d7bbe1bf22d15c8c->m_type_description == NULL); - frame_df030e46b619f2e1d7bbe1bf22d15c8c = cache_frame_df030e46b619f2e1d7bbe1bf22d15c8c; - - // Push the new frame as the currently active one. - pushFrameStack(frame_df030e46b619f2e1d7bbe1bf22d15c8c); - - // Mark the frame object as in use, ref count 1 will be up for reuse. - assert(Py_REFCNT(frame_df030e46b619f2e1d7bbe1bf22d15c8c) == 2); // Frame stack - - // Framed code: - { - nuitka_bool tmp_condition_result_1; - PyObject *tmp_operand_name_1; - PyObject *tmp_compexpr_left_1; - PyObject *tmp_compexpr_right_1; - PyObject *tmp_called_instance_1; - CHECK_OBJECT(par_target); - tmp_called_instance_1 = par_target; - frame_df030e46b619f2e1d7bbe1bf22d15c8c->m_frame.f_lineno = 73; - tmp_compexpr_left_1 = CALL_METHOD_WITH_ARGS1( - tmp_called_instance_1, - mod_consts[0], - &PyTuple_GET_ITEM(mod_consts[24], 0) - ); - - if (tmp_compexpr_left_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 73; - type_description_1 = "ooo"; - goto frame_exception_exit_1; - } - tmp_compexpr_right_1 = mod_consts[25]; - tmp_operand_name_1 = RICH_COMPARE_GT_OBJECT_OBJECT_OBJECT(tmp_compexpr_left_1, tmp_compexpr_right_1); - Py_DECREF(tmp_compexpr_left_1); - if (tmp_operand_name_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 73; - type_description_1 = "ooo"; - goto frame_exception_exit_1; - } - tmp_res = CHECK_IF_TRUE(tmp_operand_name_1); - Py_DECREF(tmp_operand_name_1); - if (tmp_res == -1) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 73; - type_description_1 = "ooo"; - goto frame_exception_exit_1; - } - tmp_condition_result_1 = (tmp_res == 0) ? NUITKA_BOOL_TRUE : NUITKA_BOOL_FALSE; - if (tmp_condition_result_1 == NUITKA_BOOL_TRUE) { - goto branch_yes_1; - } else { - goto branch_no_1; - } - } - branch_yes_1:; - { - PyObject *tmp_raise_type_1; - PyObject *tmp_raise_value_1; - tmp_raise_type_1 = PyExc_AssertionError; - tmp_raise_value_1 = mod_consts[26]; - exception_type = tmp_raise_type_1; - Py_INCREF(tmp_raise_type_1); - exception_value = tmp_raise_value_1; - Py_INCREF(tmp_raise_value_1); - exception_lineno = 73; - RAISE_EXCEPTION_WITH_VALUE(&exception_type, &exception_value, &exception_tb); - type_description_1 = "ooo"; - goto frame_exception_exit_1; - } - branch_no_1:; - { - PyObject *tmp_assign_source_1; - PyObject *tmp_expression_name_1; - PyObject *tmp_subscript_name_1; - if (par_target == NULL) { - - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[4]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - exception_lineno = 76; - type_description_1 = "ooo"; - goto frame_exception_exit_1; - } - - tmp_expression_name_1 = par_target; - tmp_subscript_name_1 = mod_consts[27]; - tmp_assign_source_1 = LOOKUP_SUBSCRIPT(tmp_expression_name_1, tmp_subscript_name_1); - if (tmp_assign_source_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 76; - type_description_1 = "ooo"; - goto frame_exception_exit_1; - } - { - PyObject *old = par_target; - par_target = tmp_assign_source_1; - Py_XDECREF(old); - } - - } - { - nuitka_bool tmp_condition_result_2; - PyObject *tmp_expression_name_2; - PyObject *tmp_attribute_value_1; - int tmp_truth_name_1; - CHECK_OBJECT(par_self); - tmp_expression_name_2 = par_self; - tmp_attribute_value_1 = LOOKUP_ATTRIBUTE(tmp_expression_name_2, mod_consts[23]); - if (tmp_attribute_value_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 78; - type_description_1 = "ooo"; - goto frame_exception_exit_1; - } - tmp_truth_name_1 = CHECK_IF_TRUE(tmp_attribute_value_1); - if (tmp_truth_name_1 == -1) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - Py_DECREF(tmp_attribute_value_1); - - exception_lineno = 78; - type_description_1 = "ooo"; - goto frame_exception_exit_1; - } - tmp_condition_result_2 = tmp_truth_name_1 == 0 ? NUITKA_BOOL_FALSE : NUITKA_BOOL_TRUE; - Py_DECREF(tmp_attribute_value_1); - if (tmp_condition_result_2 == NUITKA_BOOL_TRUE) { - goto branch_yes_2; - } else { - goto branch_no_2; - } - } - branch_yes_2:; - { - PyObject *tmp_assign_source_2; - PyObject *tmp_called_name_1; - PyObject *tmp_expression_name_3; - PyObject *tmp_args_name_1; - PyObject *tmp_tuple_element_1; - PyObject *tmp_kwargs_name_1; - tmp_expression_name_3 = GET_STRING_DICT_VALUE(moduledict_models$unet3d$losses, (Nuitka_StringObject *)mod_consts[28]); - - if (unlikely(tmp_expression_name_3 == NULL)) { - tmp_expression_name_3 = GET_MODULE_VARIABLE_VALUE_FALLBACK(mod_consts[28]); - } - - if (tmp_expression_name_3 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 80; - type_description_1 = "ooo"; - goto frame_exception_exit_1; - } - tmp_called_name_1 = LOOKUP_ATTRIBUTE(tmp_expression_name_3, mod_consts[29]); - if (tmp_called_name_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 80; - type_description_1 = "ooo"; - goto frame_exception_exit_1; - } - CHECK_OBJECT(par_target); - tmp_tuple_element_1 = par_target; - tmp_args_name_1 = PyTuple_New(1); - PyTuple_SET_ITEM0(tmp_args_name_1, 0, tmp_tuple_element_1); - tmp_kwargs_name_1 = PyDict_Copy(mod_consts[30]); - frame_df030e46b619f2e1d7bbe1bf22d15c8c->m_frame.f_lineno = 80; - tmp_assign_source_2 = CALL_FUNCTION(tmp_called_name_1, tmp_args_name_1, tmp_kwargs_name_1); - Py_DECREF(tmp_called_name_1); - Py_DECREF(tmp_args_name_1); - Py_DECREF(tmp_kwargs_name_1); - if (tmp_assign_source_2 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 80; - type_description_1 = "ooo"; - goto frame_exception_exit_1; - } - { - PyObject *old = par_target; - par_target = tmp_assign_source_2; - Py_XDECREF(old); - } - - } - branch_no_2:; - { - PyObject *tmp_called_instance_2; - PyObject *tmp_args_element_name_1; - PyObject *tmp_args_element_name_2; - if (par_self == NULL) { - - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[21]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - exception_lineno = 81; - type_description_1 = "ooo"; - goto frame_exception_exit_1; - } - - tmp_called_instance_2 = par_self; - CHECK_OBJECT(par_input); - tmp_args_element_name_1 = par_input; - CHECK_OBJECT(par_target); - tmp_args_element_name_2 = par_target; - frame_df030e46b619f2e1d7bbe1bf22d15c8c->m_frame.f_lineno = 81; - { - PyObject *call_args[] = {tmp_args_element_name_1, tmp_args_element_name_2}; - tmp_return_value = CALL_METHOD_WITH_ARGS2( - tmp_called_instance_2, - mod_consts[15], - call_args - ); - } - - if (tmp_return_value == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 81; - type_description_1 = "ooo"; - goto frame_exception_exit_1; - } - goto frame_return_exit_1; - } - -#if 0 - RESTORE_FRAME_EXCEPTION(frame_df030e46b619f2e1d7bbe1bf22d15c8c); -#endif - - // Put the previous frame back on top. - popFrameStack(); - - goto frame_no_exception_1; - - frame_return_exit_1:; -#if 0 - RESTORE_FRAME_EXCEPTION(frame_df030e46b619f2e1d7bbe1bf22d15c8c); -#endif - - // Put the previous frame back on top. - popFrameStack(); - - goto try_return_handler_1; - - frame_exception_exit_1:; - -#if 0 - RESTORE_FRAME_EXCEPTION(frame_df030e46b619f2e1d7bbe1bf22d15c8c); -#endif - - if (exception_tb == NULL) { - exception_tb = MAKE_TRACEBACK(frame_df030e46b619f2e1d7bbe1bf22d15c8c, exception_lineno); - } else if (exception_tb->tb_frame != &frame_df030e46b619f2e1d7bbe1bf22d15c8c->m_frame) { - exception_tb = ADD_TRACEBACK(exception_tb, frame_df030e46b619f2e1d7bbe1bf22d15c8c, exception_lineno); - } - - // Attaches locals to frame if any. - Nuitka_Frame_AttachLocals( - frame_df030e46b619f2e1d7bbe1bf22d15c8c, - type_description_1, - par_self, - par_input, - par_target - ); - - - // Release cached frame if used for exception. - if (frame_df030e46b619f2e1d7bbe1bf22d15c8c == cache_frame_df030e46b619f2e1d7bbe1bf22d15c8c) { -#if _DEBUG_REFCOUNTS - count_active_frame_cache_instances -= 1; - count_released_frame_cache_instances += 1; -#endif - - Py_DECREF(cache_frame_df030e46b619f2e1d7bbe1bf22d15c8c); - cache_frame_df030e46b619f2e1d7bbe1bf22d15c8c = NULL; - } - - assertFrameObject(frame_df030e46b619f2e1d7bbe1bf22d15c8c); - - // Put the previous frame back on top. - popFrameStack(); - - // Return the error. - goto try_except_handler_1; - - frame_no_exception_1:; - NUITKA_CANNOT_GET_HERE("tried codes exits in all cases"); - return NULL; - // Return handler code: - try_return_handler_1:; - Py_XDECREF(par_self); - par_self = NULL; - Py_XDECREF(par_input); - par_input = NULL; - Py_XDECREF(par_target); - par_target = NULL; - goto function_return_exit; - // Exception handler code: - try_except_handler_1:; - exception_keeper_type_1 = exception_type; - exception_keeper_value_1 = exception_value; - exception_keeper_tb_1 = exception_tb; - exception_keeper_lineno_1 = exception_lineno; - exception_type = NULL; - exception_value = NULL; - exception_tb = NULL; - exception_lineno = 0; - - Py_XDECREF(par_self); - par_self = NULL; - Py_XDECREF(par_input); - par_input = NULL; - Py_XDECREF(par_target); - par_target = NULL; - // Re-raise. - exception_type = exception_keeper_type_1; - exception_value = exception_keeper_value_1; - exception_tb = exception_keeper_tb_1; - exception_lineno = exception_keeper_lineno_1; - - goto function_exception_exit; - // End of try: - - NUITKA_CANNOT_GET_HERE("Return statement must have exited already."); - return NULL; - -function_exception_exit: - assert(exception_type); - RESTORE_ERROR_OCCURRED(exception_type, exception_value, exception_tb); - - return NULL; - -function_return_exit: - // Function cleanup code if any. - - - // Actual function exit with return value, making sure we did not make - // the error status worse despite non-NULL return. - CHECK_OBJECT(tmp_return_value); - assert(had_error || !ERROR_OCCURRED()); - return tmp_return_value; -} - - -static PyObject *impl_models$unet3d$losses$$$function__6___init__(struct Nuitka_FunctionObject const *self, PyObject **python_pars) { - // Preserve error status for checks -#ifndef __NUITKA_NO_ASSERT__ - NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED(); -#endif - - // Local variable declarations. - PyObject *par_self = python_pars[0]; - PyObject *par_weight = python_pars[1]; - PyObject *par_normalization = python_pars[2]; - struct Nuitka_FrameObject *frame_967b9bb58a2e42c245494faa4e98659a; - NUITKA_MAY_BE_UNUSED char const *type_description_1 = NULL; - NUITKA_MAY_BE_UNUSED nuitka_void tmp_unused; - PyObject *exception_type = NULL; - PyObject *exception_value = NULL; - PyTracebackObject *exception_tb = NULL; - NUITKA_MAY_BE_UNUSED int exception_lineno = 0; - int tmp_res; - bool tmp_result; - static struct Nuitka_FrameObject *cache_frame_967b9bb58a2e42c245494faa4e98659a = NULL; - PyObject *tmp_return_value = NULL; - PyObject *exception_keeper_type_1; - PyObject *exception_keeper_value_1; - PyTracebackObject *exception_keeper_tb_1; - NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_1; - - // Actual function body. - // Tried code: - if (isFrameUnusable(cache_frame_967b9bb58a2e42c245494faa4e98659a)) { - Py_XDECREF(cache_frame_967b9bb58a2e42c245494faa4e98659a); - -#if _DEBUG_REFCOUNTS - if (cache_frame_967b9bb58a2e42c245494faa4e98659a == NULL) { - count_active_frame_cache_instances += 1; - } else { - count_released_frame_cache_instances += 1; - } - count_allocated_frame_cache_instances += 1; -#endif - cache_frame_967b9bb58a2e42c245494faa4e98659a = MAKE_FUNCTION_FRAME(codeobj_967b9bb58a2e42c245494faa4e98659a, module_models$unet3d$losses, sizeof(void *)+sizeof(void *)+sizeof(void *)+sizeof(void *)); -#if _DEBUG_REFCOUNTS - } else { - count_hit_frame_cache_instances += 1; -#endif - } - assert(cache_frame_967b9bb58a2e42c245494faa4e98659a->m_type_description == NULL); - frame_967b9bb58a2e42c245494faa4e98659a = cache_frame_967b9bb58a2e42c245494faa4e98659a; - - // Push the new frame as the currently active one. - pushFrameStack(frame_967b9bb58a2e42c245494faa4e98659a); - - // Mark the frame object as in use, ref count 1 will be up for reuse. - assert(Py_REFCNT(frame_967b9bb58a2e42c245494faa4e98659a) == 2); // Frame stack - - // Framed code: - { - PyObject *tmp_called_instance_1; - PyObject *tmp_type_arg_name_1; - PyObject *tmp_object_arg_name_1; - PyObject *tmp_call_result_1; - tmp_type_arg_name_1 = GET_STRING_DICT_VALUE(moduledict_models$unet3d$losses, (Nuitka_StringObject *)mod_consts[31]); - - if (unlikely(tmp_type_arg_name_1 == NULL)) { - tmp_type_arg_name_1 = GET_MODULE_VARIABLE_VALUE_FALLBACK(mod_consts[31]); - } - - if (tmp_type_arg_name_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 90; - type_description_1 = "oooN"; - goto frame_exception_exit_1; - } - CHECK_OBJECT(par_self); - tmp_object_arg_name_1 = par_self; - tmp_called_instance_1 = BUILTIN_SUPER2(tmp_type_arg_name_1, tmp_object_arg_name_1); - if (tmp_called_instance_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 90; - type_description_1 = "oooN"; - goto frame_exception_exit_1; - } - frame_967b9bb58a2e42c245494faa4e98659a->m_frame.f_lineno = 90; - tmp_call_result_1 = CALL_METHOD_NO_ARGS(tmp_called_instance_1, mod_consts[13]); - Py_DECREF(tmp_called_instance_1); - if (tmp_call_result_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 90; - type_description_1 = "oooN"; - goto frame_exception_exit_1; - } - Py_DECREF(tmp_call_result_1); - } - { - PyObject *tmp_called_instance_2; - PyObject *tmp_call_result_2; - PyObject *tmp_args_element_name_1; - PyObject *tmp_args_element_name_2; - CHECK_OBJECT(par_self); - tmp_called_instance_2 = par_self; - tmp_args_element_name_1 = mod_consts[33]; - CHECK_OBJECT(par_weight); - tmp_args_element_name_2 = par_weight; - frame_967b9bb58a2e42c245494faa4e98659a->m_frame.f_lineno = 91; - { - PyObject *call_args[] = {tmp_args_element_name_1, tmp_args_element_name_2}; - tmp_call_result_2 = CALL_METHOD_WITH_ARGS2( - tmp_called_instance_2, - mod_consts[32], - call_args - ); - } - - if (tmp_call_result_2 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 91; - type_description_1 = "oooN"; - goto frame_exception_exit_1; - } - Py_DECREF(tmp_call_result_2); - } - { - bool tmp_condition_result_1; - PyObject *tmp_compexpr_left_1; - PyObject *tmp_compexpr_right_1; - CHECK_OBJECT(par_normalization); - tmp_compexpr_left_1 = par_normalization; - tmp_compexpr_right_1 = LIST_COPY(mod_consts[34]); - tmp_res = PySequence_Contains(tmp_compexpr_right_1, tmp_compexpr_left_1); - Py_DECREF(tmp_compexpr_right_1); - if (tmp_res == -1) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 97; - type_description_1 = "oooN"; - goto frame_exception_exit_1; - } - tmp_condition_result_1 = (tmp_res == 0) ? true : false; - if (tmp_condition_result_1 != false) { - goto branch_yes_1; - } else { - goto branch_no_1; - } - } - branch_yes_1:; - { - PyObject *tmp_raise_type_1; - tmp_raise_type_1 = PyExc_AssertionError; - exception_type = tmp_raise_type_1; - Py_INCREF(tmp_raise_type_1); - exception_lineno = 97; - RAISE_EXCEPTION_WITH_TYPE(&exception_type, &exception_value, &exception_tb); - type_description_1 = "oooN"; - goto frame_exception_exit_1; - } - branch_no_1:; - { - nuitka_bool tmp_condition_result_2; - PyObject *tmp_compexpr_left_2; - PyObject *tmp_compexpr_right_2; - PyObject *tmp_tmp_condition_result_2_object_1; - int tmp_truth_name_1; - CHECK_OBJECT(par_normalization); - tmp_compexpr_left_2 = par_normalization; - tmp_compexpr_right_2 = mod_consts[35]; - tmp_tmp_condition_result_2_object_1 = RICH_COMPARE_EQ_OBJECT_OBJECT_OBJECT(tmp_compexpr_left_2, tmp_compexpr_right_2); - if (tmp_tmp_condition_result_2_object_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 98; - type_description_1 = "oooN"; - goto frame_exception_exit_1; - } - tmp_truth_name_1 = CHECK_IF_TRUE(tmp_tmp_condition_result_2_object_1); - if (tmp_truth_name_1 == -1) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - Py_DECREF(tmp_tmp_condition_result_2_object_1); - - exception_lineno = 98; - type_description_1 = "oooN"; - goto frame_exception_exit_1; - } - tmp_condition_result_2 = tmp_truth_name_1 == 0 ? NUITKA_BOOL_FALSE : NUITKA_BOOL_TRUE; - Py_DECREF(tmp_tmp_condition_result_2_object_1); - if (tmp_condition_result_2 == NUITKA_BOOL_TRUE) { - goto branch_yes_2; - } else { - goto branch_no_2; - } - } - branch_yes_2:; - { - PyObject *tmp_assattr_name_1; - PyObject *tmp_called_instance_3; - PyObject *tmp_assattr_target_1; - tmp_called_instance_3 = GET_STRING_DICT_VALUE(moduledict_models$unet3d$losses, (Nuitka_StringObject *)mod_consts[36]); - - if (unlikely(tmp_called_instance_3 == NULL)) { - tmp_called_instance_3 = GET_MODULE_VARIABLE_VALUE_FALLBACK(mod_consts[36]); - } - - if (tmp_called_instance_3 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 99; - type_description_1 = "oooN"; - goto frame_exception_exit_1; - } - frame_967b9bb58a2e42c245494faa4e98659a->m_frame.f_lineno = 99; - tmp_assattr_name_1 = CALL_METHOD_NO_ARGS(tmp_called_instance_3, mod_consts[37]); - if (tmp_assattr_name_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 99; - type_description_1 = "oooN"; - goto frame_exception_exit_1; - } - if (par_self == NULL) { - Py_DECREF(tmp_assattr_name_1); - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[21]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - exception_lineno = 99; - type_description_1 = "oooN"; - goto frame_exception_exit_1; - } - - tmp_assattr_target_1 = par_self; - tmp_result = SET_ATTRIBUTE(tmp_assattr_target_1, mod_consts[38], tmp_assattr_name_1); - Py_DECREF(tmp_assattr_name_1); - if (tmp_result == false) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 99; - type_description_1 = "oooN"; - goto frame_exception_exit_1; - } - } - goto branch_end_2; - branch_no_2:; - { - nuitka_bool tmp_condition_result_3; - PyObject *tmp_compexpr_left_3; - PyObject *tmp_compexpr_right_3; - PyObject *tmp_tmp_condition_result_3_object_1; - int tmp_truth_name_2; - CHECK_OBJECT(par_normalization); - tmp_compexpr_left_3 = par_normalization; - tmp_compexpr_right_3 = mod_consts[39]; - tmp_tmp_condition_result_3_object_1 = RICH_COMPARE_EQ_OBJECT_OBJECT_OBJECT(tmp_compexpr_left_3, tmp_compexpr_right_3); - if (tmp_tmp_condition_result_3_object_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 100; - type_description_1 = "oooN"; - goto frame_exception_exit_1; - } - tmp_truth_name_2 = CHECK_IF_TRUE(tmp_tmp_condition_result_3_object_1); - if (tmp_truth_name_2 == -1) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - Py_DECREF(tmp_tmp_condition_result_3_object_1); - - exception_lineno = 100; - type_description_1 = "oooN"; - goto frame_exception_exit_1; - } - tmp_condition_result_3 = tmp_truth_name_2 == 0 ? NUITKA_BOOL_FALSE : NUITKA_BOOL_TRUE; - Py_DECREF(tmp_tmp_condition_result_3_object_1); - if (tmp_condition_result_3 == NUITKA_BOOL_TRUE) { - goto branch_yes_3; - } else { - goto branch_no_3; - } - } - branch_yes_3:; - { - PyObject *tmp_assattr_name_2; - PyObject *tmp_called_name_1; - PyObject *tmp_expression_name_1; - PyObject *tmp_kwargs_name_1; - PyObject *tmp_assattr_target_2; - tmp_expression_name_1 = GET_STRING_DICT_VALUE(moduledict_models$unet3d$losses, (Nuitka_StringObject *)mod_consts[36]); - - if (unlikely(tmp_expression_name_1 == NULL)) { - tmp_expression_name_1 = GET_MODULE_VARIABLE_VALUE_FALLBACK(mod_consts[36]); - } - - if (tmp_expression_name_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 101; - type_description_1 = "oooN"; - goto frame_exception_exit_1; - } - tmp_called_name_1 = LOOKUP_ATTRIBUTE(tmp_expression_name_1, mod_consts[40]); - if (tmp_called_name_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 101; - type_description_1 = "oooN"; - goto frame_exception_exit_1; - } - tmp_kwargs_name_1 = PyDict_Copy(mod_consts[30]); - frame_967b9bb58a2e42c245494faa4e98659a->m_frame.f_lineno = 101; - tmp_assattr_name_2 = CALL_FUNCTION_WITH_KEYARGS(tmp_called_name_1, tmp_kwargs_name_1); - Py_DECREF(tmp_called_name_1); - Py_DECREF(tmp_kwargs_name_1); - if (tmp_assattr_name_2 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 101; - type_description_1 = "oooN"; - goto frame_exception_exit_1; - } - if (par_self == NULL) { - Py_DECREF(tmp_assattr_name_2); - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[21]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - exception_lineno = 101; - type_description_1 = "oooN"; - goto frame_exception_exit_1; - } - - tmp_assattr_target_2 = par_self; - tmp_result = SET_ATTRIBUTE(tmp_assattr_target_2, mod_consts[38], tmp_assattr_name_2); - Py_DECREF(tmp_assattr_name_2); - if (tmp_result == false) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 101; - type_description_1 = "oooN"; - goto frame_exception_exit_1; - } - } - goto branch_end_3; - branch_no_3:; - { - PyObject *tmp_assattr_name_3; - PyObject *tmp_assattr_target_3; - - - tmp_assattr_name_3 = MAKE_FUNCTION_models$unet3d$losses$$$function__6___init__$$$function__1_lambda(); - - if (par_self == NULL) { - Py_DECREF(tmp_assattr_name_3); - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[21]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - exception_lineno = 103; - type_description_1 = "oooN"; - goto frame_exception_exit_1; - } - - tmp_assattr_target_3 = par_self; - tmp_result = SET_ATTRIBUTE(tmp_assattr_target_3, mod_consts[38], tmp_assattr_name_3); - Py_DECREF(tmp_assattr_name_3); - if (tmp_result == false) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 103; - type_description_1 = "oooN"; - goto frame_exception_exit_1; - } - } - branch_end_3:; - branch_end_2:; - -#if 0 - RESTORE_FRAME_EXCEPTION(frame_967b9bb58a2e42c245494faa4e98659a); -#endif - - // Put the previous frame back on top. - popFrameStack(); - - goto frame_no_exception_1; - - frame_exception_exit_1:; - -#if 0 - RESTORE_FRAME_EXCEPTION(frame_967b9bb58a2e42c245494faa4e98659a); -#endif - - if (exception_tb == NULL) { - exception_tb = MAKE_TRACEBACK(frame_967b9bb58a2e42c245494faa4e98659a, exception_lineno); - } else if (exception_tb->tb_frame != &frame_967b9bb58a2e42c245494faa4e98659a->m_frame) { - exception_tb = ADD_TRACEBACK(exception_tb, frame_967b9bb58a2e42c245494faa4e98659a, exception_lineno); - } - - // Attaches locals to frame if any. - Nuitka_Frame_AttachLocals( - frame_967b9bb58a2e42c245494faa4e98659a, - type_description_1, - par_self, - par_weight, - par_normalization, - NULL - ); - - - // Release cached frame if used for exception. - if (frame_967b9bb58a2e42c245494faa4e98659a == cache_frame_967b9bb58a2e42c245494faa4e98659a) { -#if _DEBUG_REFCOUNTS - count_active_frame_cache_instances -= 1; - count_released_frame_cache_instances += 1; -#endif - - Py_DECREF(cache_frame_967b9bb58a2e42c245494faa4e98659a); - cache_frame_967b9bb58a2e42c245494faa4e98659a = NULL; - } - - assertFrameObject(frame_967b9bb58a2e42c245494faa4e98659a); - - // Put the previous frame back on top. - popFrameStack(); - - // Return the error. - goto try_except_handler_1; - - frame_no_exception_1:; - tmp_return_value = Py_None; - Py_INCREF(tmp_return_value); - goto try_return_handler_1; - NUITKA_CANNOT_GET_HERE("tried codes exits in all cases"); - return NULL; - // Return handler code: - try_return_handler_1:; - Py_XDECREF(par_self); - par_self = NULL; - Py_XDECREF(par_weight); - par_weight = NULL; - CHECK_OBJECT(par_normalization); - Py_DECREF(par_normalization); - par_normalization = NULL; - goto function_return_exit; - // Exception handler code: - try_except_handler_1:; - exception_keeper_type_1 = exception_type; - exception_keeper_value_1 = exception_value; - exception_keeper_tb_1 = exception_tb; - exception_keeper_lineno_1 = exception_lineno; - exception_type = NULL; - exception_value = NULL; - exception_tb = NULL; - exception_lineno = 0; - - Py_XDECREF(par_self); - par_self = NULL; - Py_XDECREF(par_weight); - par_weight = NULL; - CHECK_OBJECT(par_normalization); - Py_DECREF(par_normalization); - par_normalization = NULL; - // Re-raise. - exception_type = exception_keeper_type_1; - exception_value = exception_keeper_value_1; - exception_tb = exception_keeper_tb_1; - exception_lineno = exception_keeper_lineno_1; - - goto function_exception_exit; - // End of try: - - NUITKA_CANNOT_GET_HERE("Return statement must have exited already."); - return NULL; - -function_exception_exit: - assert(exception_type); - RESTORE_ERROR_OCCURRED(exception_type, exception_value, exception_tb); - - return NULL; - -function_return_exit: - // Function cleanup code if any. - - - // Actual function exit with return value, making sure we did not make - // the error status worse despite non-NULL return. - CHECK_OBJECT(tmp_return_value); - assert(had_error || !ERROR_OCCURRED()); - return tmp_return_value; -} - - -static PyObject *impl_models$unet3d$losses$$$function__6___init__$$$function__1_lambda(struct Nuitka_FunctionObject const *self, PyObject **python_pars) { - // Preserve error status for checks -#ifndef __NUITKA_NO_ASSERT__ - NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED(); -#endif - - // Local variable declarations. - PyObject *par_x = python_pars[0]; - PyObject *tmp_return_value = NULL; - - // Actual function body. - // Tried code: - CHECK_OBJECT(par_x); - tmp_return_value = par_x; - Py_INCREF(tmp_return_value); - goto try_return_handler_1; - NUITKA_CANNOT_GET_HERE("tried codes exits in all cases"); - return NULL; - // Return handler code: - try_return_handler_1:; - CHECK_OBJECT(par_x); - Py_DECREF(par_x); - par_x = NULL; - goto function_return_exit; - // End of try: - - NUITKA_CANNOT_GET_HERE("Return statement must have exited already."); - return NULL; - - -function_return_exit: - // Function cleanup code if any. - - - // Actual function exit with return value, making sure we did not make - // the error status worse despite non-NULL return. - CHECK_OBJECT(tmp_return_value); - assert(had_error || !ERROR_OCCURRED()); - return tmp_return_value; -} - - -static PyObject *impl_models$unet3d$losses$$$function__7_dice(struct Nuitka_FunctionObject const *self, PyObject **python_pars) { - // Preserve error status for checks -#ifndef __NUITKA_NO_ASSERT__ - NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED(); -#endif - - // Local variable declarations. - PyObject *par_self = python_pars[0]; - PyObject *par_input = python_pars[1]; - PyObject *par_target = python_pars[2]; - PyObject *par_weight = python_pars[3]; - struct Nuitka_FrameObject *frame_f96de2d7cdf8118d4114f6e4b5a0cc47; - NUITKA_MAY_BE_UNUSED char const *type_description_1 = NULL; - PyObject *exception_type = NULL; - PyObject *exception_value = NULL; - PyTracebackObject *exception_tb = NULL; - NUITKA_MAY_BE_UNUSED int exception_lineno = 0; - static struct Nuitka_FrameObject *cache_frame_f96de2d7cdf8118d4114f6e4b5a0cc47 = NULL; - PyObject *exception_keeper_type_1; - PyObject *exception_keeper_value_1; - PyTracebackObject *exception_keeper_tb_1; - NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_1; - - // Actual function body. - // Tried code: - if (isFrameUnusable(cache_frame_f96de2d7cdf8118d4114f6e4b5a0cc47)) { - Py_XDECREF(cache_frame_f96de2d7cdf8118d4114f6e4b5a0cc47); - -#if _DEBUG_REFCOUNTS - if (cache_frame_f96de2d7cdf8118d4114f6e4b5a0cc47 == NULL) { - count_active_frame_cache_instances += 1; - } else { - count_released_frame_cache_instances += 1; - } - count_allocated_frame_cache_instances += 1; -#endif - cache_frame_f96de2d7cdf8118d4114f6e4b5a0cc47 = MAKE_FUNCTION_FRAME(codeobj_f96de2d7cdf8118d4114f6e4b5a0cc47, module_models$unet3d$losses, sizeof(void *)+sizeof(void *)+sizeof(void *)+sizeof(void *)); -#if _DEBUG_REFCOUNTS - } else { - count_hit_frame_cache_instances += 1; -#endif - } - assert(cache_frame_f96de2d7cdf8118d4114f6e4b5a0cc47->m_type_description == NULL); - frame_f96de2d7cdf8118d4114f6e4b5a0cc47 = cache_frame_f96de2d7cdf8118d4114f6e4b5a0cc47; - - // Push the new frame as the currently active one. - pushFrameStack(frame_f96de2d7cdf8118d4114f6e4b5a0cc47); - - // Mark the frame object as in use, ref count 1 will be up for reuse. - assert(Py_REFCNT(frame_f96de2d7cdf8118d4114f6e4b5a0cc47) == 2); // Frame stack - - // Framed code: - { - PyObject *tmp_raise_type_1; - tmp_raise_type_1 = PyExc_NotImplementedError; - exception_type = tmp_raise_type_1; - Py_INCREF(tmp_raise_type_1); - exception_lineno = 107; - RAISE_EXCEPTION_WITH_TYPE(&exception_type, &exception_value, &exception_tb); - type_description_1 = "oooo"; - goto frame_exception_exit_1; - } - -#if 0 - RESTORE_FRAME_EXCEPTION(frame_f96de2d7cdf8118d4114f6e4b5a0cc47); -#endif - - // Put the previous frame back on top. - popFrameStack(); - - goto frame_no_exception_1; - - frame_exception_exit_1:; - -#if 0 - RESTORE_FRAME_EXCEPTION(frame_f96de2d7cdf8118d4114f6e4b5a0cc47); -#endif - - if (exception_tb == NULL) { - exception_tb = MAKE_TRACEBACK(frame_f96de2d7cdf8118d4114f6e4b5a0cc47, exception_lineno); - } else if (exception_tb->tb_frame != &frame_f96de2d7cdf8118d4114f6e4b5a0cc47->m_frame) { - exception_tb = ADD_TRACEBACK(exception_tb, frame_f96de2d7cdf8118d4114f6e4b5a0cc47, exception_lineno); - } - - // Attaches locals to frame if any. - Nuitka_Frame_AttachLocals( - frame_f96de2d7cdf8118d4114f6e4b5a0cc47, - type_description_1, - par_self, - par_input, - par_target, - par_weight - ); - - - // Release cached frame if used for exception. - if (frame_f96de2d7cdf8118d4114f6e4b5a0cc47 == cache_frame_f96de2d7cdf8118d4114f6e4b5a0cc47) { -#if _DEBUG_REFCOUNTS - count_active_frame_cache_instances -= 1; - count_released_frame_cache_instances += 1; -#endif - - Py_DECREF(cache_frame_f96de2d7cdf8118d4114f6e4b5a0cc47); - cache_frame_f96de2d7cdf8118d4114f6e4b5a0cc47 = NULL; - } - - assertFrameObject(frame_f96de2d7cdf8118d4114f6e4b5a0cc47); - - // Put the previous frame back on top. - popFrameStack(); - - // Return the error. - goto try_except_handler_1; - - frame_no_exception_1:; - NUITKA_CANNOT_GET_HERE("tried codes exits in all cases"); - return NULL; - // Exception handler code: - try_except_handler_1:; - exception_keeper_type_1 = exception_type; - exception_keeper_value_1 = exception_value; - exception_keeper_tb_1 = exception_tb; - exception_keeper_lineno_1 = exception_lineno; - exception_type = NULL; - exception_value = NULL; - exception_tb = NULL; - exception_lineno = 0; - - CHECK_OBJECT(par_self); - Py_DECREF(par_self); - par_self = NULL; - CHECK_OBJECT(par_input); - Py_DECREF(par_input); - par_input = NULL; - CHECK_OBJECT(par_target); - Py_DECREF(par_target); - par_target = NULL; - CHECK_OBJECT(par_weight); - Py_DECREF(par_weight); - par_weight = NULL; - // Re-raise. - exception_type = exception_keeper_type_1; - exception_value = exception_keeper_value_1; - exception_tb = exception_keeper_tb_1; - exception_lineno = exception_keeper_lineno_1; - - goto function_exception_exit; - // End of try: - - NUITKA_CANNOT_GET_HERE("Return statement must have exited already."); - return NULL; - -function_exception_exit: - assert(exception_type); - RESTORE_ERROR_OCCURRED(exception_type, exception_value, exception_tb); - - return NULL; - -} - - -static PyObject *impl_models$unet3d$losses$$$function__8_forward(struct Nuitka_FunctionObject const *self, PyObject **python_pars) { - // Preserve error status for checks -#ifndef __NUITKA_NO_ASSERT__ - NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED(); -#endif - - // Local variable declarations. - PyObject *par_self = python_pars[0]; - PyObject *par_input = python_pars[1]; - PyObject *par_target = python_pars[2]; - PyObject *var_per_channel_dice = NULL; - struct Nuitka_FrameObject *frame_599f9bc91cca49981a976e3e360b0b63; - NUITKA_MAY_BE_UNUSED char const *type_description_1 = NULL; - PyObject *exception_type = NULL; - PyObject *exception_value = NULL; - PyTracebackObject *exception_tb = NULL; - NUITKA_MAY_BE_UNUSED int exception_lineno = 0; - int tmp_res; - PyObject *tmp_return_value = NULL; - static struct Nuitka_FrameObject *cache_frame_599f9bc91cca49981a976e3e360b0b63 = NULL; - PyObject *exception_keeper_type_1; - PyObject *exception_keeper_value_1; - PyTracebackObject *exception_keeper_tb_1; - NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_1; - - // Actual function body. - // Tried code: - if (isFrameUnusable(cache_frame_599f9bc91cca49981a976e3e360b0b63)) { - Py_XDECREF(cache_frame_599f9bc91cca49981a976e3e360b0b63); - -#if _DEBUG_REFCOUNTS - if (cache_frame_599f9bc91cca49981a976e3e360b0b63 == NULL) { - count_active_frame_cache_instances += 1; - } else { - count_released_frame_cache_instances += 1; - } - count_allocated_frame_cache_instances += 1; -#endif - cache_frame_599f9bc91cca49981a976e3e360b0b63 = MAKE_FUNCTION_FRAME(codeobj_599f9bc91cca49981a976e3e360b0b63, module_models$unet3d$losses, sizeof(void *)+sizeof(void *)+sizeof(void *)+sizeof(void *)); -#if _DEBUG_REFCOUNTS - } else { - count_hit_frame_cache_instances += 1; -#endif - } - assert(cache_frame_599f9bc91cca49981a976e3e360b0b63->m_type_description == NULL); - frame_599f9bc91cca49981a976e3e360b0b63 = cache_frame_599f9bc91cca49981a976e3e360b0b63; - - // Push the new frame as the currently active one. - pushFrameStack(frame_599f9bc91cca49981a976e3e360b0b63); - - // Mark the frame object as in use, ref count 1 will be up for reuse. - assert(Py_REFCNT(frame_599f9bc91cca49981a976e3e360b0b63) == 2); // Frame stack - - // Framed code: - { - PyObject *tmp_assign_source_1; - PyObject *tmp_called_instance_1; - PyObject *tmp_args_element_name_1; - CHECK_OBJECT(par_self); - tmp_called_instance_1 = par_self; - CHECK_OBJECT(par_input); - tmp_args_element_name_1 = par_input; - frame_599f9bc91cca49981a976e3e360b0b63->m_frame.f_lineno = 111; - tmp_assign_source_1 = CALL_METHOD_WITH_SINGLE_ARG(tmp_called_instance_1, mod_consts[38], tmp_args_element_name_1); - if (tmp_assign_source_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 111; - type_description_1 = "oooo"; - goto frame_exception_exit_1; - } - { - PyObject *old = par_input; - par_input = tmp_assign_source_1; - Py_XDECREF(old); - } - - } - { - PyObject *tmp_assign_source_2; - PyObject *tmp_called_name_1; - PyObject *tmp_expression_name_1; - PyObject *tmp_args_name_1; - PyObject *tmp_tuple_element_1; - PyObject *tmp_kwargs_name_1; - PyObject *tmp_dict_key_1; - PyObject *tmp_dict_value_1; - PyObject *tmp_expression_name_2; - if (par_self == NULL) { - - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[21]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - exception_lineno = 114; - type_description_1 = "oooo"; - goto frame_exception_exit_1; - } - - tmp_expression_name_1 = par_self; - tmp_called_name_1 = LOOKUP_ATTRIBUTE(tmp_expression_name_1, mod_consts[43]); - if (tmp_called_name_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 114; - type_description_1 = "oooo"; - goto frame_exception_exit_1; - } - CHECK_OBJECT(par_input); - tmp_tuple_element_1 = par_input; - tmp_args_name_1 = PyTuple_New(2); - PyTuple_SET_ITEM0(tmp_args_name_1, 0, tmp_tuple_element_1); - CHECK_OBJECT(par_target); - tmp_tuple_element_1 = par_target; - PyTuple_SET_ITEM0(tmp_args_name_1, 1, tmp_tuple_element_1); - tmp_dict_key_1 = mod_consts[33]; - if (par_self == NULL) { - Py_DECREF(tmp_called_name_1); - Py_DECREF(tmp_args_name_1); - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[21]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - exception_lineno = 114; - type_description_1 = "oooo"; - goto frame_exception_exit_1; - } - - tmp_expression_name_2 = par_self; - tmp_dict_value_1 = LOOKUP_ATTRIBUTE(tmp_expression_name_2, mod_consts[33]); - if (tmp_dict_value_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - Py_DECREF(tmp_called_name_1); - Py_DECREF(tmp_args_name_1); - - exception_lineno = 114; - type_description_1 = "oooo"; - goto frame_exception_exit_1; - } - tmp_kwargs_name_1 = _PyDict_NewPresized( 1 ); - tmp_res = PyDict_SetItem(tmp_kwargs_name_1, tmp_dict_key_1, tmp_dict_value_1); - Py_DECREF(tmp_dict_value_1); - assert(!(tmp_res != 0)); - frame_599f9bc91cca49981a976e3e360b0b63->m_frame.f_lineno = 114; - tmp_assign_source_2 = CALL_FUNCTION(tmp_called_name_1, tmp_args_name_1, tmp_kwargs_name_1); - Py_DECREF(tmp_called_name_1); - Py_DECREF(tmp_args_name_1); - Py_DECREF(tmp_kwargs_name_1); - if (tmp_assign_source_2 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 114; - type_description_1 = "oooo"; - goto frame_exception_exit_1; - } - assert(var_per_channel_dice == NULL); - var_per_channel_dice = tmp_assign_source_2; - } - { - PyObject *tmp_left_name_1; - PyObject *tmp_right_name_1; - PyObject *tmp_called_instance_2; - PyObject *tmp_args_element_name_2; - tmp_left_name_1 = mod_consts[44]; - tmp_called_instance_2 = GET_STRING_DICT_VALUE(moduledict_models$unet3d$losses, (Nuitka_StringObject *)mod_consts[28]); - - if (unlikely(tmp_called_instance_2 == NULL)) { - tmp_called_instance_2 = GET_MODULE_VARIABLE_VALUE_FALLBACK(mod_consts[28]); - } - - if (tmp_called_instance_2 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 117; - type_description_1 = "oooo"; - goto frame_exception_exit_1; - } - CHECK_OBJECT(var_per_channel_dice); - tmp_args_element_name_2 = var_per_channel_dice; - frame_599f9bc91cca49981a976e3e360b0b63->m_frame.f_lineno = 117; - tmp_right_name_1 = CALL_METHOD_WITH_SINGLE_ARG(tmp_called_instance_2, mod_consts[45], tmp_args_element_name_2); - if (tmp_right_name_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 117; - type_description_1 = "oooo"; - goto frame_exception_exit_1; - } - tmp_return_value = BINARY_OPERATION_SUB_OBJECT_FLOAT_OBJECT(tmp_left_name_1, tmp_right_name_1); - Py_DECREF(tmp_right_name_1); - if (tmp_return_value == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 117; - type_description_1 = "oooo"; - goto frame_exception_exit_1; - } - goto frame_return_exit_1; - } - -#if 0 - RESTORE_FRAME_EXCEPTION(frame_599f9bc91cca49981a976e3e360b0b63); -#endif - - // Put the previous frame back on top. - popFrameStack(); - - goto frame_no_exception_1; - - frame_return_exit_1:; -#if 0 - RESTORE_FRAME_EXCEPTION(frame_599f9bc91cca49981a976e3e360b0b63); -#endif - - // Put the previous frame back on top. - popFrameStack(); - - goto try_return_handler_1; - - frame_exception_exit_1:; - -#if 0 - RESTORE_FRAME_EXCEPTION(frame_599f9bc91cca49981a976e3e360b0b63); -#endif - - if (exception_tb == NULL) { - exception_tb = MAKE_TRACEBACK(frame_599f9bc91cca49981a976e3e360b0b63, exception_lineno); - } else if (exception_tb->tb_frame != &frame_599f9bc91cca49981a976e3e360b0b63->m_frame) { - exception_tb = ADD_TRACEBACK(exception_tb, frame_599f9bc91cca49981a976e3e360b0b63, exception_lineno); - } - - // Attaches locals to frame if any. - Nuitka_Frame_AttachLocals( - frame_599f9bc91cca49981a976e3e360b0b63, - type_description_1, - par_self, - par_input, - par_target, - var_per_channel_dice - ); - - - // Release cached frame if used for exception. - if (frame_599f9bc91cca49981a976e3e360b0b63 == cache_frame_599f9bc91cca49981a976e3e360b0b63) { -#if _DEBUG_REFCOUNTS - count_active_frame_cache_instances -= 1; - count_released_frame_cache_instances += 1; -#endif - - Py_DECREF(cache_frame_599f9bc91cca49981a976e3e360b0b63); - cache_frame_599f9bc91cca49981a976e3e360b0b63 = NULL; - } - - assertFrameObject(frame_599f9bc91cca49981a976e3e360b0b63); - - // Put the previous frame back on top. - popFrameStack(); - - // Return the error. - goto try_except_handler_1; - - frame_no_exception_1:; - NUITKA_CANNOT_GET_HERE("tried codes exits in all cases"); - return NULL; - // Return handler code: - try_return_handler_1:; - Py_XDECREF(par_self); - par_self = NULL; - Py_XDECREF(par_input); - par_input = NULL; - Py_XDECREF(par_target); - par_target = NULL; - Py_XDECREF(var_per_channel_dice); - var_per_channel_dice = NULL; - goto function_return_exit; - // Exception handler code: - try_except_handler_1:; - exception_keeper_type_1 = exception_type; - exception_keeper_value_1 = exception_value; - exception_keeper_tb_1 = exception_tb; - exception_keeper_lineno_1 = exception_lineno; - exception_type = NULL; - exception_value = NULL; - exception_tb = NULL; - exception_lineno = 0; - - Py_XDECREF(par_self); - par_self = NULL; - Py_XDECREF(par_input); - par_input = NULL; - Py_XDECREF(par_target); - par_target = NULL; - Py_XDECREF(var_per_channel_dice); - var_per_channel_dice = NULL; - // Re-raise. - exception_type = exception_keeper_type_1; - exception_value = exception_keeper_value_1; - exception_tb = exception_keeper_tb_1; - exception_lineno = exception_keeper_lineno_1; - - goto function_exception_exit; - // End of try: - - NUITKA_CANNOT_GET_HERE("Return statement must have exited already."); - return NULL; - -function_exception_exit: - assert(exception_type); - RESTORE_ERROR_OCCURRED(exception_type, exception_value, exception_tb); - - return NULL; - -function_return_exit: - // Function cleanup code if any. - - - // Actual function exit with return value, making sure we did not make - // the error status worse despite non-NULL return. - CHECK_OBJECT(tmp_return_value); - assert(had_error || !ERROR_OCCURRED()); - return tmp_return_value; -} - - -static PyObject *impl_models$unet3d$losses$$$function__9___init__(struct Nuitka_FunctionObject const *self, PyObject **python_pars) { - // Preserve error status for checks -#ifndef __NUITKA_NO_ASSERT__ - NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED(); -#endif - - // Local variable declarations. - PyObject *par_self = python_pars[0]; - PyObject *par_weight = python_pars[1]; - PyObject *par_normalization = python_pars[2]; - struct Nuitka_FrameObject *frame_38eaebfe4d2be968a308d6c799019465; - NUITKA_MAY_BE_UNUSED char const *type_description_1 = NULL; - NUITKA_MAY_BE_UNUSED nuitka_void tmp_unused; - PyObject *exception_type = NULL; - PyObject *exception_value = NULL; - PyTracebackObject *exception_tb = NULL; - NUITKA_MAY_BE_UNUSED int exception_lineno = 0; - static struct Nuitka_FrameObject *cache_frame_38eaebfe4d2be968a308d6c799019465 = NULL; - PyObject *tmp_return_value = NULL; - PyObject *exception_keeper_type_1; - PyObject *exception_keeper_value_1; - PyTracebackObject *exception_keeper_tb_1; - NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_1; - - // Actual function body. - // Tried code: - if (isFrameUnusable(cache_frame_38eaebfe4d2be968a308d6c799019465)) { - Py_XDECREF(cache_frame_38eaebfe4d2be968a308d6c799019465); - -#if _DEBUG_REFCOUNTS - if (cache_frame_38eaebfe4d2be968a308d6c799019465 == NULL) { - count_active_frame_cache_instances += 1; - } else { - count_released_frame_cache_instances += 1; - } - count_allocated_frame_cache_instances += 1; -#endif - cache_frame_38eaebfe4d2be968a308d6c799019465 = MAKE_FUNCTION_FRAME(codeobj_38eaebfe4d2be968a308d6c799019465, module_models$unet3d$losses, sizeof(void *)+sizeof(void *)+sizeof(void *)+sizeof(void *)); -#if _DEBUG_REFCOUNTS - } else { - count_hit_frame_cache_instances += 1; -#endif - } - assert(cache_frame_38eaebfe4d2be968a308d6c799019465->m_type_description == NULL); - frame_38eaebfe4d2be968a308d6c799019465 = cache_frame_38eaebfe4d2be968a308d6c799019465; - - // Push the new frame as the currently active one. - pushFrameStack(frame_38eaebfe4d2be968a308d6c799019465); - - // Mark the frame object as in use, ref count 1 will be up for reuse. - assert(Py_REFCNT(frame_38eaebfe4d2be968a308d6c799019465) == 2); // Frame stack - - // Framed code: - { - PyObject *tmp_called_instance_1; - PyObject *tmp_type_arg_name_1; - PyObject *tmp_object_arg_name_1; - PyObject *tmp_call_result_1; - PyObject *tmp_args_element_name_1; - PyObject *tmp_args_element_name_2; - if (Nuitka_Cell_GET(self->m_closure[0]) == NULL) { - - FORMAT_UNBOUND_CLOSURE_ERROR(&exception_type, &exception_value, mod_consts[46]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - exception_lineno = 127; - type_description_1 = "oooc"; - goto frame_exception_exit_1; - } - - tmp_type_arg_name_1 = Nuitka_Cell_GET(self->m_closure[0]); - CHECK_OBJECT(par_self); - tmp_object_arg_name_1 = par_self; - tmp_called_instance_1 = BUILTIN_SUPER0(tmp_type_arg_name_1, tmp_object_arg_name_1); - if (tmp_called_instance_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 127; - type_description_1 = "oooc"; - goto frame_exception_exit_1; - } - CHECK_OBJECT(par_weight); - tmp_args_element_name_1 = par_weight; - CHECK_OBJECT(par_normalization); - tmp_args_element_name_2 = par_normalization; - frame_38eaebfe4d2be968a308d6c799019465->m_frame.f_lineno = 127; - { - PyObject *call_args[] = {tmp_args_element_name_1, tmp_args_element_name_2}; - tmp_call_result_1 = CALL_METHOD_WITH_ARGS2( - tmp_called_instance_1, - mod_consts[13], - call_args - ); - } - - Py_DECREF(tmp_called_instance_1); - if (tmp_call_result_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 127; - type_description_1 = "oooc"; - goto frame_exception_exit_1; - } - Py_DECREF(tmp_call_result_1); - } - -#if 0 - RESTORE_FRAME_EXCEPTION(frame_38eaebfe4d2be968a308d6c799019465); -#endif - - // Put the previous frame back on top. - popFrameStack(); - - goto frame_no_exception_1; - - frame_exception_exit_1:; - -#if 0 - RESTORE_FRAME_EXCEPTION(frame_38eaebfe4d2be968a308d6c799019465); -#endif - - if (exception_tb == NULL) { - exception_tb = MAKE_TRACEBACK(frame_38eaebfe4d2be968a308d6c799019465, exception_lineno); - } else if (exception_tb->tb_frame != &frame_38eaebfe4d2be968a308d6c799019465->m_frame) { - exception_tb = ADD_TRACEBACK(exception_tb, frame_38eaebfe4d2be968a308d6c799019465, exception_lineno); - } - - // Attaches locals to frame if any. - Nuitka_Frame_AttachLocals( - frame_38eaebfe4d2be968a308d6c799019465, - type_description_1, - par_self, - par_weight, - par_normalization, - self->m_closure[0] - ); - - - // Release cached frame if used for exception. - if (frame_38eaebfe4d2be968a308d6c799019465 == cache_frame_38eaebfe4d2be968a308d6c799019465) { -#if _DEBUG_REFCOUNTS - count_active_frame_cache_instances -= 1; - count_released_frame_cache_instances += 1; -#endif - - Py_DECREF(cache_frame_38eaebfe4d2be968a308d6c799019465); - cache_frame_38eaebfe4d2be968a308d6c799019465 = NULL; - } - - assertFrameObject(frame_38eaebfe4d2be968a308d6c799019465); - - // Put the previous frame back on top. - popFrameStack(); - - // Return the error. - goto try_except_handler_1; - - frame_no_exception_1:; - tmp_return_value = Py_None; - Py_INCREF(tmp_return_value); - goto try_return_handler_1; - NUITKA_CANNOT_GET_HERE("tried codes exits in all cases"); - return NULL; - // Return handler code: - try_return_handler_1:; - CHECK_OBJECT(par_self); - Py_DECREF(par_self); - par_self = NULL; - Py_XDECREF(par_weight); - par_weight = NULL; - Py_XDECREF(par_normalization); - par_normalization = NULL; - goto function_return_exit; - // Exception handler code: - try_except_handler_1:; - exception_keeper_type_1 = exception_type; - exception_keeper_value_1 = exception_value; - exception_keeper_tb_1 = exception_tb; - exception_keeper_lineno_1 = exception_lineno; - exception_type = NULL; - exception_value = NULL; - exception_tb = NULL; - exception_lineno = 0; - - CHECK_OBJECT(par_self); - Py_DECREF(par_self); - par_self = NULL; - Py_XDECREF(par_weight); - par_weight = NULL; - Py_XDECREF(par_normalization); - par_normalization = NULL; - // Re-raise. - exception_type = exception_keeper_type_1; - exception_value = exception_keeper_value_1; - exception_tb = exception_keeper_tb_1; - exception_lineno = exception_keeper_lineno_1; - - goto function_exception_exit; - // End of try: - - NUITKA_CANNOT_GET_HERE("Return statement must have exited already."); - return NULL; - -function_exception_exit: - assert(exception_type); - RESTORE_ERROR_OCCURRED(exception_type, exception_value, exception_tb); - - return NULL; - -function_return_exit: - // Function cleanup code if any. - - - // Actual function exit with return value, making sure we did not make - // the error status worse despite non-NULL return. - CHECK_OBJECT(tmp_return_value); - assert(had_error || !ERROR_OCCURRED()); - return tmp_return_value; -} - - -static PyObject *impl_models$unet3d$losses$$$function__10_dice(struct Nuitka_FunctionObject const *self, PyObject **python_pars) { - // Preserve error status for checks -#ifndef __NUITKA_NO_ASSERT__ - NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED(); -#endif - - // Local variable declarations. - PyObject *par_self = python_pars[0]; - PyObject *par_input = python_pars[1]; - PyObject *par_target = python_pars[2]; - PyObject *par_weight = python_pars[3]; - struct Nuitka_FrameObject *frame_7138dc343b9d36f61ecf5068b1d4a9e2; - NUITKA_MAY_BE_UNUSED char const *type_description_1 = NULL; - PyObject *tmp_return_value = NULL; - PyObject *exception_type = NULL; - PyObject *exception_value = NULL; - PyTracebackObject *exception_tb = NULL; - NUITKA_MAY_BE_UNUSED int exception_lineno = 0; - int tmp_res; - static struct Nuitka_FrameObject *cache_frame_7138dc343b9d36f61ecf5068b1d4a9e2 = NULL; - PyObject *exception_keeper_type_1; - PyObject *exception_keeper_value_1; - PyTracebackObject *exception_keeper_tb_1; - NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_1; - - // Actual function body. - // Tried code: - if (isFrameUnusable(cache_frame_7138dc343b9d36f61ecf5068b1d4a9e2)) { - Py_XDECREF(cache_frame_7138dc343b9d36f61ecf5068b1d4a9e2); - -#if _DEBUG_REFCOUNTS - if (cache_frame_7138dc343b9d36f61ecf5068b1d4a9e2 == NULL) { - count_active_frame_cache_instances += 1; - } else { - count_released_frame_cache_instances += 1; - } - count_allocated_frame_cache_instances += 1; -#endif - cache_frame_7138dc343b9d36f61ecf5068b1d4a9e2 = MAKE_FUNCTION_FRAME(codeobj_7138dc343b9d36f61ecf5068b1d4a9e2, module_models$unet3d$losses, sizeof(void *)+sizeof(void *)+sizeof(void *)+sizeof(void *)); -#if _DEBUG_REFCOUNTS - } else { - count_hit_frame_cache_instances += 1; -#endif - } - assert(cache_frame_7138dc343b9d36f61ecf5068b1d4a9e2->m_type_description == NULL); - frame_7138dc343b9d36f61ecf5068b1d4a9e2 = cache_frame_7138dc343b9d36f61ecf5068b1d4a9e2; - - // Push the new frame as the currently active one. - pushFrameStack(frame_7138dc343b9d36f61ecf5068b1d4a9e2); - - // Mark the frame object as in use, ref count 1 will be up for reuse. - assert(Py_REFCNT(frame_7138dc343b9d36f61ecf5068b1d4a9e2) == 2); // Frame stack - - // Framed code: - { - PyObject *tmp_called_name_1; - PyObject *tmp_args_name_1; - PyObject *tmp_tuple_element_1; - PyObject *tmp_kwargs_name_1; - PyObject *tmp_dict_key_1; - PyObject *tmp_dict_value_1; - PyObject *tmp_expression_name_1; - tmp_called_name_1 = GET_STRING_DICT_VALUE(moduledict_models$unet3d$losses, (Nuitka_StringObject *)mod_consts[47]); - - if (unlikely(tmp_called_name_1 == NULL)) { - tmp_called_name_1 = GET_MODULE_VARIABLE_VALUE_FALLBACK(mod_consts[47]); - } - - if (tmp_called_name_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 130; - type_description_1 = "oooo"; - goto frame_exception_exit_1; - } - CHECK_OBJECT(par_input); - tmp_tuple_element_1 = par_input; - tmp_args_name_1 = PyTuple_New(2); - PyTuple_SET_ITEM0(tmp_args_name_1, 0, tmp_tuple_element_1); - CHECK_OBJECT(par_target); - tmp_tuple_element_1 = par_target; - PyTuple_SET_ITEM0(tmp_args_name_1, 1, tmp_tuple_element_1); - tmp_dict_key_1 = mod_consts[33]; - CHECK_OBJECT(par_self); - tmp_expression_name_1 = par_self; - tmp_dict_value_1 = LOOKUP_ATTRIBUTE(tmp_expression_name_1, mod_consts[33]); - if (tmp_dict_value_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - Py_DECREF(tmp_args_name_1); - - exception_lineno = 130; - type_description_1 = "oooo"; - goto frame_exception_exit_1; - } - tmp_kwargs_name_1 = _PyDict_NewPresized( 1 ); - tmp_res = PyDict_SetItem(tmp_kwargs_name_1, tmp_dict_key_1, tmp_dict_value_1); - Py_DECREF(tmp_dict_value_1); - assert(!(tmp_res != 0)); - frame_7138dc343b9d36f61ecf5068b1d4a9e2->m_frame.f_lineno = 130; - tmp_return_value = CALL_FUNCTION(tmp_called_name_1, tmp_args_name_1, tmp_kwargs_name_1); - Py_DECREF(tmp_args_name_1); - Py_DECREF(tmp_kwargs_name_1); - if (tmp_return_value == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 130; - type_description_1 = "oooo"; - goto frame_exception_exit_1; - } - goto frame_return_exit_1; - } - -#if 0 - RESTORE_FRAME_EXCEPTION(frame_7138dc343b9d36f61ecf5068b1d4a9e2); -#endif - - // Put the previous frame back on top. - popFrameStack(); - - goto frame_no_exception_1; - - frame_return_exit_1:; -#if 0 - RESTORE_FRAME_EXCEPTION(frame_7138dc343b9d36f61ecf5068b1d4a9e2); -#endif - - // Put the previous frame back on top. - popFrameStack(); - - goto try_return_handler_1; - - frame_exception_exit_1:; - -#if 0 - RESTORE_FRAME_EXCEPTION(frame_7138dc343b9d36f61ecf5068b1d4a9e2); -#endif - - if (exception_tb == NULL) { - exception_tb = MAKE_TRACEBACK(frame_7138dc343b9d36f61ecf5068b1d4a9e2, exception_lineno); - } else if (exception_tb->tb_frame != &frame_7138dc343b9d36f61ecf5068b1d4a9e2->m_frame) { - exception_tb = ADD_TRACEBACK(exception_tb, frame_7138dc343b9d36f61ecf5068b1d4a9e2, exception_lineno); - } - - // Attaches locals to frame if any. - Nuitka_Frame_AttachLocals( - frame_7138dc343b9d36f61ecf5068b1d4a9e2, - type_description_1, - par_self, - par_input, - par_target, - par_weight - ); - - - // Release cached frame if used for exception. - if (frame_7138dc343b9d36f61ecf5068b1d4a9e2 == cache_frame_7138dc343b9d36f61ecf5068b1d4a9e2) { -#if _DEBUG_REFCOUNTS - count_active_frame_cache_instances -= 1; - count_released_frame_cache_instances += 1; -#endif - - Py_DECREF(cache_frame_7138dc343b9d36f61ecf5068b1d4a9e2); - cache_frame_7138dc343b9d36f61ecf5068b1d4a9e2 = NULL; - } - - assertFrameObject(frame_7138dc343b9d36f61ecf5068b1d4a9e2); - - // Put the previous frame back on top. - popFrameStack(); - - // Return the error. - goto try_except_handler_1; - - frame_no_exception_1:; - NUITKA_CANNOT_GET_HERE("tried codes exits in all cases"); - return NULL; - // Return handler code: - try_return_handler_1:; - Py_XDECREF(par_self); - par_self = NULL; - CHECK_OBJECT(par_input); - Py_DECREF(par_input); - par_input = NULL; - CHECK_OBJECT(par_target); - Py_DECREF(par_target); - par_target = NULL; - CHECK_OBJECT(par_weight); - Py_DECREF(par_weight); - par_weight = NULL; - goto function_return_exit; - // Exception handler code: - try_except_handler_1:; - exception_keeper_type_1 = exception_type; - exception_keeper_value_1 = exception_value; - exception_keeper_tb_1 = exception_tb; - exception_keeper_lineno_1 = exception_lineno; - exception_type = NULL; - exception_value = NULL; - exception_tb = NULL; - exception_lineno = 0; - - Py_XDECREF(par_self); - par_self = NULL; - CHECK_OBJECT(par_input); - Py_DECREF(par_input); - par_input = NULL; - CHECK_OBJECT(par_target); - Py_DECREF(par_target); - par_target = NULL; - CHECK_OBJECT(par_weight); - Py_DECREF(par_weight); - par_weight = NULL; - // Re-raise. - exception_type = exception_keeper_type_1; - exception_value = exception_keeper_value_1; - exception_tb = exception_keeper_tb_1; - exception_lineno = exception_keeper_lineno_1; - - goto function_exception_exit; - // End of try: - - NUITKA_CANNOT_GET_HERE("Return statement must have exited already."); - return NULL; - -function_exception_exit: - assert(exception_type); - RESTORE_ERROR_OCCURRED(exception_type, exception_value, exception_tb); - - return NULL; - -function_return_exit: - // Function cleanup code if any. - - - // Actual function exit with return value, making sure we did not make - // the error status worse despite non-NULL return. - CHECK_OBJECT(tmp_return_value); - assert(had_error || !ERROR_OCCURRED()); - return tmp_return_value; -} - - -static PyObject *impl_models$unet3d$losses$$$function__11___init__(struct Nuitka_FunctionObject const *self, PyObject **python_pars) { - // Preserve error status for checks -#ifndef __NUITKA_NO_ASSERT__ - NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED(); -#endif - - // Local variable declarations. - PyObject *par_self = python_pars[0]; - PyObject *par_normalization = python_pars[1]; - PyObject *par_epsilon = python_pars[2]; - struct Nuitka_FrameObject *frame_689fefa3b59b704f733760f36572546b; - NUITKA_MAY_BE_UNUSED char const *type_description_1 = NULL; - NUITKA_MAY_BE_UNUSED nuitka_void tmp_unused; - PyObject *exception_type = NULL; - PyObject *exception_value = NULL; - PyTracebackObject *exception_tb = NULL; - NUITKA_MAY_BE_UNUSED int exception_lineno = 0; - int tmp_res; - bool tmp_result; - static struct Nuitka_FrameObject *cache_frame_689fefa3b59b704f733760f36572546b = NULL; - PyObject *tmp_return_value = NULL; - PyObject *exception_keeper_type_1; - PyObject *exception_keeper_value_1; - PyTracebackObject *exception_keeper_tb_1; - NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_1; - - // Actual function body. - // Tried code: - if (isFrameUnusable(cache_frame_689fefa3b59b704f733760f36572546b)) { - Py_XDECREF(cache_frame_689fefa3b59b704f733760f36572546b); - -#if _DEBUG_REFCOUNTS - if (cache_frame_689fefa3b59b704f733760f36572546b == NULL) { - count_active_frame_cache_instances += 1; - } else { - count_released_frame_cache_instances += 1; - } - count_allocated_frame_cache_instances += 1; -#endif - cache_frame_689fefa3b59b704f733760f36572546b = MAKE_FUNCTION_FRAME(codeobj_689fefa3b59b704f733760f36572546b, module_models$unet3d$losses, sizeof(void *)+sizeof(void *)+sizeof(void *)+sizeof(void *)); -#if _DEBUG_REFCOUNTS - } else { - count_hit_frame_cache_instances += 1; -#endif - } - assert(cache_frame_689fefa3b59b704f733760f36572546b->m_type_description == NULL); - frame_689fefa3b59b704f733760f36572546b = cache_frame_689fefa3b59b704f733760f36572546b; - - // Push the new frame as the currently active one. - pushFrameStack(frame_689fefa3b59b704f733760f36572546b); - - // Mark the frame object as in use, ref count 1 will be up for reuse. - assert(Py_REFCNT(frame_689fefa3b59b704f733760f36572546b) == 2); // Frame stack - - // Framed code: - { - PyObject *tmp_called_name_1; - PyObject *tmp_expression_name_1; - PyObject *tmp_type_arg_name_1; - PyObject *tmp_object_arg_name_1; - PyObject *tmp_call_result_1; - PyObject *tmp_kwargs_name_1; - PyObject *tmp_dict_key_1; - PyObject *tmp_dict_value_1; - if (Nuitka_Cell_GET(self->m_closure[0]) == NULL) { - - FORMAT_UNBOUND_CLOSURE_ERROR(&exception_type, &exception_value, mod_consts[46]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - exception_lineno = 138; - type_description_1 = "oooc"; - goto frame_exception_exit_1; - } - - tmp_type_arg_name_1 = Nuitka_Cell_GET(self->m_closure[0]); - CHECK_OBJECT(par_self); - tmp_object_arg_name_1 = par_self; - tmp_expression_name_1 = BUILTIN_SUPER0(tmp_type_arg_name_1, tmp_object_arg_name_1); - if (tmp_expression_name_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 138; - type_description_1 = "oooc"; - goto frame_exception_exit_1; - } - tmp_called_name_1 = LOOKUP_ATTRIBUTE(tmp_expression_name_1, mod_consts[13]); - Py_DECREF(tmp_expression_name_1); - if (tmp_called_name_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 138; - type_description_1 = "oooc"; - goto frame_exception_exit_1; - } - tmp_dict_key_1 = mod_consts[33]; - tmp_dict_value_1 = Py_None; - tmp_kwargs_name_1 = _PyDict_NewPresized( 2 ); - tmp_res = PyDict_SetItem(tmp_kwargs_name_1, tmp_dict_key_1, tmp_dict_value_1); - assert(!(tmp_res != 0)); - tmp_dict_key_1 = mod_consts[38]; - CHECK_OBJECT(par_normalization); - tmp_dict_value_1 = par_normalization; - tmp_res = PyDict_SetItem(tmp_kwargs_name_1, tmp_dict_key_1, tmp_dict_value_1); - assert(!(tmp_res != 0)); - frame_689fefa3b59b704f733760f36572546b->m_frame.f_lineno = 138; - tmp_call_result_1 = CALL_FUNCTION_WITH_KEYARGS(tmp_called_name_1, tmp_kwargs_name_1); - Py_DECREF(tmp_called_name_1); - Py_DECREF(tmp_kwargs_name_1); - if (tmp_call_result_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 138; - type_description_1 = "oooc"; - goto frame_exception_exit_1; - } - Py_DECREF(tmp_call_result_1); - } - { - PyObject *tmp_assattr_name_1; - PyObject *tmp_assattr_target_1; - CHECK_OBJECT(par_epsilon); - tmp_assattr_name_1 = par_epsilon; - CHECK_OBJECT(par_self); - tmp_assattr_target_1 = par_self; - tmp_result = SET_ATTRIBUTE(tmp_assattr_target_1, mod_consts[48], tmp_assattr_name_1); - if (tmp_result == false) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 139; - type_description_1 = "oooc"; - goto frame_exception_exit_1; - } - } - -#if 0 - RESTORE_FRAME_EXCEPTION(frame_689fefa3b59b704f733760f36572546b); -#endif - - // Put the previous frame back on top. - popFrameStack(); - - goto frame_no_exception_1; - - frame_exception_exit_1:; - -#if 0 - RESTORE_FRAME_EXCEPTION(frame_689fefa3b59b704f733760f36572546b); -#endif - - if (exception_tb == NULL) { - exception_tb = MAKE_TRACEBACK(frame_689fefa3b59b704f733760f36572546b, exception_lineno); - } else if (exception_tb->tb_frame != &frame_689fefa3b59b704f733760f36572546b->m_frame) { - exception_tb = ADD_TRACEBACK(exception_tb, frame_689fefa3b59b704f733760f36572546b, exception_lineno); - } - - // Attaches locals to frame if any. - Nuitka_Frame_AttachLocals( - frame_689fefa3b59b704f733760f36572546b, - type_description_1, - par_self, - par_normalization, - par_epsilon, - self->m_closure[0] - ); - - - // Release cached frame if used for exception. - if (frame_689fefa3b59b704f733760f36572546b == cache_frame_689fefa3b59b704f733760f36572546b) { -#if _DEBUG_REFCOUNTS - count_active_frame_cache_instances -= 1; - count_released_frame_cache_instances += 1; -#endif - - Py_DECREF(cache_frame_689fefa3b59b704f733760f36572546b); - cache_frame_689fefa3b59b704f733760f36572546b = NULL; - } - - assertFrameObject(frame_689fefa3b59b704f733760f36572546b); - - // Put the previous frame back on top. - popFrameStack(); - - // Return the error. - goto try_except_handler_1; - - frame_no_exception_1:; - tmp_return_value = Py_None; - Py_INCREF(tmp_return_value); - goto try_return_handler_1; - NUITKA_CANNOT_GET_HERE("tried codes exits in all cases"); - return NULL; - // Return handler code: - try_return_handler_1:; - CHECK_OBJECT(par_self); - Py_DECREF(par_self); - par_self = NULL; - Py_XDECREF(par_normalization); - par_normalization = NULL; - CHECK_OBJECT(par_epsilon); - Py_DECREF(par_epsilon); - par_epsilon = NULL; - goto function_return_exit; - // Exception handler code: - try_except_handler_1:; - exception_keeper_type_1 = exception_type; - exception_keeper_value_1 = exception_value; - exception_keeper_tb_1 = exception_tb; - exception_keeper_lineno_1 = exception_lineno; - exception_type = NULL; - exception_value = NULL; - exception_tb = NULL; - exception_lineno = 0; - - CHECK_OBJECT(par_self); - Py_DECREF(par_self); - par_self = NULL; - Py_XDECREF(par_normalization); - par_normalization = NULL; - CHECK_OBJECT(par_epsilon); - Py_DECREF(par_epsilon); - par_epsilon = NULL; - // Re-raise. - exception_type = exception_keeper_type_1; - exception_value = exception_keeper_value_1; - exception_tb = exception_keeper_tb_1; - exception_lineno = exception_keeper_lineno_1; - - goto function_exception_exit; - // End of try: - - NUITKA_CANNOT_GET_HERE("Return statement must have exited already."); - return NULL; - -function_exception_exit: - assert(exception_type); - RESTORE_ERROR_OCCURRED(exception_type, exception_value, exception_tb); - - return NULL; - -function_return_exit: - // Function cleanup code if any. - - - // Actual function exit with return value, making sure we did not make - // the error status worse despite non-NULL return. - CHECK_OBJECT(tmp_return_value); - assert(had_error || !ERROR_OCCURRED()); - return tmp_return_value; -} - - -static PyObject *impl_models$unet3d$losses$$$function__12_dice(struct Nuitka_FunctionObject const *self, PyObject **python_pars) { - // Preserve error status for checks -#ifndef __NUITKA_NO_ASSERT__ - NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED(); -#endif - - // Local variable declarations. - PyObject *par_self = python_pars[0]; - PyObject *par_input = python_pars[1]; - PyObject *par_target = python_pars[2]; - PyObject *par_weight = python_pars[3]; - PyObject *var_w_l = NULL; - PyObject *var_intersect = NULL; - PyObject *var_denominator = NULL; - struct Nuitka_FrameObject *frame_d8de5593120711397ebcd544a9a5beee; - NUITKA_MAY_BE_UNUSED char const *type_description_1 = NULL; - PyObject *exception_type = NULL; - PyObject *exception_value = NULL; - PyTracebackObject *exception_tb = NULL; - NUITKA_MAY_BE_UNUSED int exception_lineno = 0; - int tmp_res; - bool tmp_result; - PyObject *tmp_return_value = NULL; - static struct Nuitka_FrameObject *cache_frame_d8de5593120711397ebcd544a9a5beee = NULL; - PyObject *exception_keeper_type_1; - PyObject *exception_keeper_value_1; - PyTracebackObject *exception_keeper_tb_1; - NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_1; - - // Actual function body. - // Tried code: - if (isFrameUnusable(cache_frame_d8de5593120711397ebcd544a9a5beee)) { - Py_XDECREF(cache_frame_d8de5593120711397ebcd544a9a5beee); - -#if _DEBUG_REFCOUNTS - if (cache_frame_d8de5593120711397ebcd544a9a5beee == NULL) { - count_active_frame_cache_instances += 1; - } else { - count_released_frame_cache_instances += 1; - } - count_allocated_frame_cache_instances += 1; -#endif - cache_frame_d8de5593120711397ebcd544a9a5beee = MAKE_FUNCTION_FRAME(codeobj_d8de5593120711397ebcd544a9a5beee, module_models$unet3d$losses, sizeof(void *)+sizeof(void *)+sizeof(void *)+sizeof(void *)+sizeof(void *)+sizeof(void *)+sizeof(void *)); -#if _DEBUG_REFCOUNTS - } else { - count_hit_frame_cache_instances += 1; -#endif - } - assert(cache_frame_d8de5593120711397ebcd544a9a5beee->m_type_description == NULL); - frame_d8de5593120711397ebcd544a9a5beee = cache_frame_d8de5593120711397ebcd544a9a5beee; - - // Push the new frame as the currently active one. - pushFrameStack(frame_d8de5593120711397ebcd544a9a5beee); - - // Mark the frame object as in use, ref count 1 will be up for reuse. - assert(Py_REFCNT(frame_d8de5593120711397ebcd544a9a5beee) == 2); // Frame stack - - // Framed code: - { - nuitka_bool tmp_condition_result_1; - PyObject *tmp_operand_name_1; - PyObject *tmp_compexpr_left_1; - PyObject *tmp_compexpr_right_1; - PyObject *tmp_called_instance_1; - PyObject *tmp_called_instance_2; - CHECK_OBJECT(par_input); - tmp_called_instance_1 = par_input; - frame_d8de5593120711397ebcd544a9a5beee->m_frame.f_lineno = 142; - tmp_compexpr_left_1 = CALL_METHOD_NO_ARGS(tmp_called_instance_1, mod_consts[0]); - if (tmp_compexpr_left_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 142; - type_description_1 = "ooooooo"; - goto frame_exception_exit_1; - } - CHECK_OBJECT(par_target); - tmp_called_instance_2 = par_target; - frame_d8de5593120711397ebcd544a9a5beee->m_frame.f_lineno = 142; - tmp_compexpr_right_1 = CALL_METHOD_NO_ARGS(tmp_called_instance_2, mod_consts[0]); - if (tmp_compexpr_right_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - Py_DECREF(tmp_compexpr_left_1); - - exception_lineno = 142; - type_description_1 = "ooooooo"; - goto frame_exception_exit_1; - } - tmp_operand_name_1 = RICH_COMPARE_EQ_OBJECT_OBJECT_OBJECT(tmp_compexpr_left_1, tmp_compexpr_right_1); - Py_DECREF(tmp_compexpr_left_1); - Py_DECREF(tmp_compexpr_right_1); - if (tmp_operand_name_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 142; - type_description_1 = "ooooooo"; - goto frame_exception_exit_1; - } - tmp_res = CHECK_IF_TRUE(tmp_operand_name_1); - Py_DECREF(tmp_operand_name_1); - if (tmp_res == -1) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 142; - type_description_1 = "ooooooo"; - goto frame_exception_exit_1; - } - tmp_condition_result_1 = (tmp_res == 0) ? NUITKA_BOOL_TRUE : NUITKA_BOOL_FALSE; - if (tmp_condition_result_1 == NUITKA_BOOL_TRUE) { - goto branch_yes_1; - } else { - goto branch_no_1; - } - } - branch_yes_1:; - { - PyObject *tmp_raise_type_1; - PyObject *tmp_raise_value_1; - tmp_raise_type_1 = PyExc_AssertionError; - tmp_raise_value_1 = mod_consts[1]; - exception_type = tmp_raise_type_1; - Py_INCREF(tmp_raise_type_1); - exception_value = tmp_raise_value_1; - Py_INCREF(tmp_raise_value_1); - exception_lineno = 142; - RAISE_EXCEPTION_WITH_VALUE(&exception_type, &exception_value, &exception_tb); - type_description_1 = "ooooooo"; - goto frame_exception_exit_1; - } - branch_no_1:; - { - PyObject *tmp_assign_source_1; - PyObject *tmp_called_name_1; - PyObject *tmp_args_element_name_1; - tmp_called_name_1 = GET_STRING_DICT_VALUE(moduledict_models$unet3d$losses, (Nuitka_StringObject *)mod_consts[2]); - - if (unlikely(tmp_called_name_1 == NULL)) { - tmp_called_name_1 = GET_MODULE_VARIABLE_VALUE_FALLBACK(mod_consts[2]); - } - - if (tmp_called_name_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 144; - type_description_1 = "ooooooo"; - goto frame_exception_exit_1; - } - if (par_input == NULL) { - - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[3]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - exception_lineno = 144; - type_description_1 = "ooooooo"; - goto frame_exception_exit_1; - } - - tmp_args_element_name_1 = par_input; - frame_d8de5593120711397ebcd544a9a5beee->m_frame.f_lineno = 144; - tmp_assign_source_1 = CALL_FUNCTION_WITH_SINGLE_ARG(tmp_called_name_1, tmp_args_element_name_1); - if (tmp_assign_source_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 144; - type_description_1 = "ooooooo"; - goto frame_exception_exit_1; - } - { - PyObject *old = par_input; - par_input = tmp_assign_source_1; - Py_XDECREF(old); - } - - } - { - PyObject *tmp_assign_source_2; - PyObject *tmp_called_name_2; - PyObject *tmp_args_element_name_2; - tmp_called_name_2 = GET_STRING_DICT_VALUE(moduledict_models$unet3d$losses, (Nuitka_StringObject *)mod_consts[2]); - - if (unlikely(tmp_called_name_2 == NULL)) { - tmp_called_name_2 = GET_MODULE_VARIABLE_VALUE_FALLBACK(mod_consts[2]); - } - - if (tmp_called_name_2 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 145; - type_description_1 = "ooooooo"; - goto frame_exception_exit_1; - } - if (par_target == NULL) { - - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[4]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - exception_lineno = 145; - type_description_1 = "ooooooo"; - goto frame_exception_exit_1; - } - - tmp_args_element_name_2 = par_target; - frame_d8de5593120711397ebcd544a9a5beee->m_frame.f_lineno = 145; - tmp_assign_source_2 = CALL_FUNCTION_WITH_SINGLE_ARG(tmp_called_name_2, tmp_args_element_name_2); - if (tmp_assign_source_2 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 145; - type_description_1 = "ooooooo"; - goto frame_exception_exit_1; - } - { - PyObject *old = par_target; - par_target = tmp_assign_source_2; - Py_XDECREF(old); - } - - } - { - PyObject *tmp_assign_source_3; - PyObject *tmp_called_instance_3; - CHECK_OBJECT(par_target); - tmp_called_instance_3 = par_target; - frame_d8de5593120711397ebcd544a9a5beee->m_frame.f_lineno = 146; - tmp_assign_source_3 = CALL_METHOD_NO_ARGS(tmp_called_instance_3, mod_consts[5]); - if (tmp_assign_source_3 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 146; - type_description_1 = "ooooooo"; - goto frame_exception_exit_1; - } - { - PyObject *old = par_target; - par_target = tmp_assign_source_3; - Py_XDECREF(old); - } - - } - { - nuitka_bool tmp_condition_result_2; - PyObject *tmp_compexpr_left_2; - PyObject *tmp_compexpr_right_2; - PyObject *tmp_called_instance_4; - PyObject *tmp_tmp_condition_result_2_object_1; - int tmp_truth_name_1; - CHECK_OBJECT(par_input); - tmp_called_instance_4 = par_input; - frame_d8de5593120711397ebcd544a9a5beee->m_frame.f_lineno = 148; - tmp_compexpr_left_2 = CALL_METHOD_WITH_ARGS1( - tmp_called_instance_4, - mod_consts[0], - &PyTuple_GET_ITEM(mod_consts[49], 0) - ); - - if (tmp_compexpr_left_2 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 148; - type_description_1 = "ooooooo"; - goto frame_exception_exit_1; - } - tmp_compexpr_right_2 = mod_consts[25]; - tmp_tmp_condition_result_2_object_1 = RICH_COMPARE_EQ_OBJECT_OBJECT_OBJECT(tmp_compexpr_left_2, tmp_compexpr_right_2); - Py_DECREF(tmp_compexpr_left_2); - if (tmp_tmp_condition_result_2_object_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 148; - type_description_1 = "ooooooo"; - goto frame_exception_exit_1; - } - tmp_truth_name_1 = CHECK_IF_TRUE(tmp_tmp_condition_result_2_object_1); - if (tmp_truth_name_1 == -1) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - Py_DECREF(tmp_tmp_condition_result_2_object_1); - - exception_lineno = 148; - type_description_1 = "ooooooo"; - goto frame_exception_exit_1; - } - tmp_condition_result_2 = tmp_truth_name_1 == 0 ? NUITKA_BOOL_FALSE : NUITKA_BOOL_TRUE; - Py_DECREF(tmp_tmp_condition_result_2_object_1); - if (tmp_condition_result_2 == NUITKA_BOOL_TRUE) { - goto branch_yes_2; - } else { - goto branch_no_2; - } - } - branch_yes_2:; - { - PyObject *tmp_assign_source_4; - PyObject *tmp_called_name_3; - PyObject *tmp_expression_name_1; - PyObject *tmp_args_name_1; - PyObject *tmp_tuple_element_1; - PyObject *tmp_tuple_element_2; - PyObject *tmp_kwargs_name_1; - tmp_expression_name_1 = GET_STRING_DICT_VALUE(moduledict_models$unet3d$losses, (Nuitka_StringObject *)mod_consts[28]); - - if (unlikely(tmp_expression_name_1 == NULL)) { - tmp_expression_name_1 = GET_MODULE_VARIABLE_VALUE_FALLBACK(mod_consts[28]); - } - - if (tmp_expression_name_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 151; - type_description_1 = "ooooooo"; - goto frame_exception_exit_1; - } - tmp_called_name_3 = LOOKUP_ATTRIBUTE(tmp_expression_name_1, mod_consts[50]); - if (tmp_called_name_3 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 151; - type_description_1 = "ooooooo"; - goto frame_exception_exit_1; - } - if (par_input == NULL) { - Py_DECREF(tmp_called_name_3); - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[3]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - exception_lineno = 151; - type_description_1 = "ooooooo"; - goto frame_exception_exit_1; - } - - tmp_tuple_element_2 = par_input; - tmp_tuple_element_1 = PyTuple_New(2); - { - PyObject *tmp_left_name_1; - PyObject *tmp_right_name_1; - PyTuple_SET_ITEM0(tmp_tuple_element_1, 0, tmp_tuple_element_2); - tmp_left_name_1 = mod_consts[25]; - if (par_input == NULL) { - - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[3]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - exception_lineno = 151; - type_description_1 = "ooooooo"; - goto tuple_build_exception_1; - } - - tmp_right_name_1 = par_input; - tmp_tuple_element_2 = BINARY_OPERATION_SUB_OBJECT_LONG_OBJECT(tmp_left_name_1, tmp_right_name_1); - if (tmp_tuple_element_2 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 151; - type_description_1 = "ooooooo"; - goto tuple_build_exception_1; - } - PyTuple_SET_ITEM(tmp_tuple_element_1, 1, tmp_tuple_element_2); - } - goto tuple_build_noexception_1; - // Exception handling pass through code for tuple_build: - tuple_build_exception_1:; - Py_DECREF(tmp_called_name_3); - Py_DECREF(tmp_tuple_element_1); - goto frame_exception_exit_1; - // Finished with no exception for tuple_build: - tuple_build_noexception_1:; - tmp_args_name_1 = PyTuple_New(1); - PyTuple_SET_ITEM(tmp_args_name_1, 0, tmp_tuple_element_1); - tmp_kwargs_name_1 = PyDict_Copy(mod_consts[51]); - frame_d8de5593120711397ebcd544a9a5beee->m_frame.f_lineno = 151; - tmp_assign_source_4 = CALL_FUNCTION(tmp_called_name_3, tmp_args_name_1, tmp_kwargs_name_1); - Py_DECREF(tmp_called_name_3); - Py_DECREF(tmp_args_name_1); - Py_DECREF(tmp_kwargs_name_1); - if (tmp_assign_source_4 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 151; - type_description_1 = "ooooooo"; - goto frame_exception_exit_1; - } - { - PyObject *old = par_input; - par_input = tmp_assign_source_4; - Py_XDECREF(old); - } - - } - { - PyObject *tmp_assign_source_5; - PyObject *tmp_called_name_4; - PyObject *tmp_expression_name_2; - PyObject *tmp_args_name_2; - PyObject *tmp_tuple_element_3; - PyObject *tmp_tuple_element_4; - PyObject *tmp_kwargs_name_2; - tmp_expression_name_2 = GET_STRING_DICT_VALUE(moduledict_models$unet3d$losses, (Nuitka_StringObject *)mod_consts[28]); - - if (unlikely(tmp_expression_name_2 == NULL)) { - tmp_expression_name_2 = GET_MODULE_VARIABLE_VALUE_FALLBACK(mod_consts[28]); - } - - if (tmp_expression_name_2 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 152; - type_description_1 = "ooooooo"; - goto frame_exception_exit_1; - } - tmp_called_name_4 = LOOKUP_ATTRIBUTE(tmp_expression_name_2, mod_consts[50]); - if (tmp_called_name_4 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 152; - type_description_1 = "ooooooo"; - goto frame_exception_exit_1; - } - CHECK_OBJECT(par_target); - tmp_tuple_element_4 = par_target; - tmp_tuple_element_3 = PyTuple_New(2); - { - PyObject *tmp_left_name_2; - PyObject *tmp_right_name_2; - PyTuple_SET_ITEM0(tmp_tuple_element_3, 0, tmp_tuple_element_4); - tmp_left_name_2 = mod_consts[25]; - CHECK_OBJECT(par_target); - tmp_right_name_2 = par_target; - tmp_tuple_element_4 = BINARY_OPERATION_SUB_OBJECT_LONG_OBJECT(tmp_left_name_2, tmp_right_name_2); - if (tmp_tuple_element_4 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 152; - type_description_1 = "ooooooo"; - goto tuple_build_exception_2; - } - PyTuple_SET_ITEM(tmp_tuple_element_3, 1, tmp_tuple_element_4); - } - goto tuple_build_noexception_2; - // Exception handling pass through code for tuple_build: - tuple_build_exception_2:; - Py_DECREF(tmp_called_name_4); - Py_DECREF(tmp_tuple_element_3); - goto frame_exception_exit_1; - // Finished with no exception for tuple_build: - tuple_build_noexception_2:; - tmp_args_name_2 = PyTuple_New(1); - PyTuple_SET_ITEM(tmp_args_name_2, 0, tmp_tuple_element_3); - tmp_kwargs_name_2 = PyDict_Copy(mod_consts[51]); - frame_d8de5593120711397ebcd544a9a5beee->m_frame.f_lineno = 152; - tmp_assign_source_5 = CALL_FUNCTION(tmp_called_name_4, tmp_args_name_2, tmp_kwargs_name_2); - Py_DECREF(tmp_called_name_4); - Py_DECREF(tmp_args_name_2); - Py_DECREF(tmp_kwargs_name_2); - if (tmp_assign_source_5 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 152; - type_description_1 = "ooooooo"; - goto frame_exception_exit_1; - } - { - PyObject *old = par_target; - par_target = tmp_assign_source_5; - Py_XDECREF(old); - } - - } - branch_no_2:; - { - PyObject *tmp_assign_source_6; - PyObject *tmp_called_instance_5; - CHECK_OBJECT(par_target); - tmp_called_instance_5 = par_target; - frame_d8de5593120711397ebcd544a9a5beee->m_frame.f_lineno = 155; - tmp_assign_source_6 = CALL_METHOD_WITH_ARGS1( - tmp_called_instance_5, - mod_consts[6], - &PyTuple_GET_ITEM(mod_consts[7], 0) - ); - - if (tmp_assign_source_6 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 155; - type_description_1 = "ooooooo"; - goto frame_exception_exit_1; - } - assert(var_w_l == NULL); - var_w_l = tmp_assign_source_6; - } - { - PyObject *tmp_assign_source_7; - PyObject *tmp_left_name_3; - PyObject *tmp_right_name_3; - PyObject *tmp_called_name_5; - PyObject *tmp_expression_name_3; - PyObject *tmp_left_name_4; - PyObject *tmp_right_name_4; - PyObject *tmp_kwargs_name_3; - PyObject *tmp_dict_key_1; - PyObject *tmp_dict_value_1; - PyObject *tmp_expression_name_4; - tmp_left_name_3 = mod_consts[25]; - CHECK_OBJECT(var_w_l); - tmp_left_name_4 = var_w_l; - CHECK_OBJECT(var_w_l); - tmp_right_name_4 = var_w_l; - tmp_expression_name_3 = BINARY_OPERATION_MULT_OBJECT_OBJECT_OBJECT(tmp_left_name_4, tmp_right_name_4); - if (tmp_expression_name_3 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 156; - type_description_1 = "ooooooo"; - goto frame_exception_exit_1; - } - tmp_called_name_5 = LOOKUP_ATTRIBUTE(tmp_expression_name_3, mod_consts[9]); - Py_DECREF(tmp_expression_name_3); - if (tmp_called_name_5 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 156; - type_description_1 = "ooooooo"; - goto frame_exception_exit_1; - } - tmp_dict_key_1 = mod_consts[10]; - CHECK_OBJECT(par_self); - tmp_expression_name_4 = par_self; - tmp_dict_value_1 = LOOKUP_ATTRIBUTE(tmp_expression_name_4, mod_consts[48]); - if (tmp_dict_value_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - Py_DECREF(tmp_called_name_5); - - exception_lineno = 156; - type_description_1 = "ooooooo"; - goto frame_exception_exit_1; - } - tmp_kwargs_name_3 = _PyDict_NewPresized( 1 ); - tmp_res = PyDict_SetItem(tmp_kwargs_name_3, tmp_dict_key_1, tmp_dict_value_1); - Py_DECREF(tmp_dict_value_1); - assert(!(tmp_res != 0)); - frame_d8de5593120711397ebcd544a9a5beee->m_frame.f_lineno = 156; - tmp_right_name_3 = CALL_FUNCTION_WITH_KEYARGS(tmp_called_name_5, tmp_kwargs_name_3); - Py_DECREF(tmp_called_name_5); - Py_DECREF(tmp_kwargs_name_3); - if (tmp_right_name_3 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 156; - type_description_1 = "ooooooo"; - goto frame_exception_exit_1; - } - tmp_assign_source_7 = BINARY_OPERATION_TRUEDIV_OBJECT_LONG_OBJECT(tmp_left_name_3, tmp_right_name_3); - Py_DECREF(tmp_right_name_3); - if (tmp_assign_source_7 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 156; - type_description_1 = "ooooooo"; - goto frame_exception_exit_1; - } - { - PyObject *old = var_w_l; - var_w_l = tmp_assign_source_7; - Py_XDECREF(old); - } - - } - { - PyObject *tmp_assattr_name_1; - PyObject *tmp_assattr_target_1; - tmp_assattr_name_1 = Py_False; - CHECK_OBJECT(var_w_l); - tmp_assattr_target_1 = var_w_l; - tmp_result = SET_ATTRIBUTE(tmp_assattr_target_1, mod_consts[19], tmp_assattr_name_1); - if (tmp_result == false) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 157; - type_description_1 = "ooooooo"; - goto frame_exception_exit_1; - } - } - { - PyObject *tmp_assign_source_8; - PyObject *tmp_called_instance_6; - PyObject *tmp_left_name_5; - PyObject *tmp_right_name_5; - if (par_input == NULL) { - - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[3]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - exception_lineno = 159; - type_description_1 = "ooooooo"; - goto frame_exception_exit_1; - } - - tmp_left_name_5 = par_input; - if (par_target == NULL) { - - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[4]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - exception_lineno = 159; - type_description_1 = "ooooooo"; - goto frame_exception_exit_1; - } - - tmp_right_name_5 = par_target; - tmp_called_instance_6 = BINARY_OPERATION_MULT_OBJECT_OBJECT_OBJECT(tmp_left_name_5, tmp_right_name_5); - if (tmp_called_instance_6 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 159; - type_description_1 = "ooooooo"; - goto frame_exception_exit_1; - } - frame_d8de5593120711397ebcd544a9a5beee->m_frame.f_lineno = 159; - tmp_assign_source_8 = CALL_METHOD_WITH_ARGS1( - tmp_called_instance_6, - mod_consts[6], - &PyTuple_GET_ITEM(mod_consts[7], 0) - ); - - Py_DECREF(tmp_called_instance_6); - if (tmp_assign_source_8 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 159; - type_description_1 = "ooooooo"; - goto frame_exception_exit_1; - } - assert(var_intersect == NULL); - var_intersect = tmp_assign_source_8; - } - { - PyObject *tmp_assign_source_9; - PyObject *tmp_left_name_6; - PyObject *tmp_right_name_6; - CHECK_OBJECT(var_intersect); - tmp_left_name_6 = var_intersect; - CHECK_OBJECT(var_w_l); - tmp_right_name_6 = var_w_l; - tmp_assign_source_9 = BINARY_OPERATION_MULT_OBJECT_OBJECT_OBJECT(tmp_left_name_6, tmp_right_name_6); - if (tmp_assign_source_9 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 160; - type_description_1 = "ooooooo"; - goto frame_exception_exit_1; - } - { - PyObject *old = var_intersect; - var_intersect = tmp_assign_source_9; - Py_XDECREF(old); - } - - } - { - PyObject *tmp_assign_source_10; - PyObject *tmp_called_instance_7; - PyObject *tmp_left_name_7; - PyObject *tmp_right_name_7; - if (par_input == NULL) { - - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[3]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - exception_lineno = 162; - type_description_1 = "ooooooo"; - goto frame_exception_exit_1; - } - - tmp_left_name_7 = par_input; - if (par_target == NULL) { - - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[4]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - exception_lineno = 162; - type_description_1 = "ooooooo"; - goto frame_exception_exit_1; - } - - tmp_right_name_7 = par_target; - tmp_called_instance_7 = BINARY_OPERATION_ADD_OBJECT_OBJECT_OBJECT(tmp_left_name_7, tmp_right_name_7); - if (tmp_called_instance_7 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 162; - type_description_1 = "ooooooo"; - goto frame_exception_exit_1; - } - frame_d8de5593120711397ebcd544a9a5beee->m_frame.f_lineno = 162; - tmp_assign_source_10 = CALL_METHOD_WITH_ARGS1( - tmp_called_instance_7, - mod_consts[6], - &PyTuple_GET_ITEM(mod_consts[7], 0) - ); - - Py_DECREF(tmp_called_instance_7); - if (tmp_assign_source_10 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 162; - type_description_1 = "ooooooo"; - goto frame_exception_exit_1; - } - assert(var_denominator == NULL); - var_denominator = tmp_assign_source_10; - } - { - PyObject *tmp_assign_source_11; - PyObject *tmp_called_name_6; - PyObject *tmp_expression_name_5; - PyObject *tmp_left_name_8; - PyObject *tmp_right_name_8; - PyObject *tmp_kwargs_name_4; - PyObject *tmp_dict_key_2; - PyObject *tmp_dict_value_2; - PyObject *tmp_expression_name_6; - CHECK_OBJECT(var_denominator); - tmp_left_name_8 = var_denominator; - if (var_w_l == NULL) { - - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[52]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - exception_lineno = 163; - type_description_1 = "ooooooo"; - goto frame_exception_exit_1; - } - - tmp_right_name_8 = var_w_l; - tmp_expression_name_5 = BINARY_OPERATION_MULT_OBJECT_OBJECT_OBJECT(tmp_left_name_8, tmp_right_name_8); - if (tmp_expression_name_5 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 163; - type_description_1 = "ooooooo"; - goto frame_exception_exit_1; - } - tmp_called_name_6 = LOOKUP_ATTRIBUTE(tmp_expression_name_5, mod_consts[9]); - Py_DECREF(tmp_expression_name_5); - if (tmp_called_name_6 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 163; - type_description_1 = "ooooooo"; - goto frame_exception_exit_1; - } - tmp_dict_key_2 = mod_consts[10]; - if (par_self == NULL) { - Py_DECREF(tmp_called_name_6); - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[21]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - exception_lineno = 163; - type_description_1 = "ooooooo"; - goto frame_exception_exit_1; - } - - tmp_expression_name_6 = par_self; - tmp_dict_value_2 = LOOKUP_ATTRIBUTE(tmp_expression_name_6, mod_consts[48]); - if (tmp_dict_value_2 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - Py_DECREF(tmp_called_name_6); - - exception_lineno = 163; - type_description_1 = "ooooooo"; - goto frame_exception_exit_1; - } - tmp_kwargs_name_4 = _PyDict_NewPresized( 1 ); - tmp_res = PyDict_SetItem(tmp_kwargs_name_4, tmp_dict_key_2, tmp_dict_value_2); - Py_DECREF(tmp_dict_value_2); - assert(!(tmp_res != 0)); - frame_d8de5593120711397ebcd544a9a5beee->m_frame.f_lineno = 163; - tmp_assign_source_11 = CALL_FUNCTION_WITH_KEYARGS(tmp_called_name_6, tmp_kwargs_name_4); - Py_DECREF(tmp_called_name_6); - Py_DECREF(tmp_kwargs_name_4); - if (tmp_assign_source_11 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 163; - type_description_1 = "ooooooo"; - goto frame_exception_exit_1; - } - { - PyObject *old = var_denominator; - var_denominator = tmp_assign_source_11; - Py_XDECREF(old); - } - - } - { - PyObject *tmp_left_name_9; - PyObject *tmp_right_name_9; - PyObject *tmp_left_name_10; - PyObject *tmp_called_instance_8; - PyObject *tmp_right_name_10; - PyObject *tmp_called_instance_9; - tmp_left_name_9 = mod_consts[8]; - CHECK_OBJECT(var_intersect); - tmp_called_instance_8 = var_intersect; - frame_d8de5593120711397ebcd544a9a5beee->m_frame.f_lineno = 165; - tmp_left_name_10 = CALL_METHOD_NO_ARGS(tmp_called_instance_8, mod_consts[6]); - if (tmp_left_name_10 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 165; - type_description_1 = "ooooooo"; - goto frame_exception_exit_1; - } - CHECK_OBJECT(var_denominator); - tmp_called_instance_9 = var_denominator; - frame_d8de5593120711397ebcd544a9a5beee->m_frame.f_lineno = 165; - tmp_right_name_10 = CALL_METHOD_NO_ARGS(tmp_called_instance_9, mod_consts[6]); - if (tmp_right_name_10 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - Py_DECREF(tmp_left_name_10); - - exception_lineno = 165; - type_description_1 = "ooooooo"; - goto frame_exception_exit_1; - } - tmp_right_name_9 = BINARY_OPERATION_TRUEDIV_OBJECT_OBJECT_OBJECT(tmp_left_name_10, tmp_right_name_10); - Py_DECREF(tmp_left_name_10); - Py_DECREF(tmp_right_name_10); - if (tmp_right_name_9 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 165; - type_description_1 = "ooooooo"; - goto frame_exception_exit_1; - } - tmp_return_value = BINARY_OPERATION_MULT_OBJECT_LONG_OBJECT(tmp_left_name_9, tmp_right_name_9); - Py_DECREF(tmp_right_name_9); - if (tmp_return_value == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 165; - type_description_1 = "ooooooo"; - goto frame_exception_exit_1; - } - goto frame_return_exit_1; - } - -#if 0 - RESTORE_FRAME_EXCEPTION(frame_d8de5593120711397ebcd544a9a5beee); -#endif - - // Put the previous frame back on top. - popFrameStack(); - - goto frame_no_exception_1; - - frame_return_exit_1:; -#if 0 - RESTORE_FRAME_EXCEPTION(frame_d8de5593120711397ebcd544a9a5beee); -#endif - - // Put the previous frame back on top. - popFrameStack(); - - goto try_return_handler_1; - - frame_exception_exit_1:; - -#if 0 - RESTORE_FRAME_EXCEPTION(frame_d8de5593120711397ebcd544a9a5beee); -#endif - - if (exception_tb == NULL) { - exception_tb = MAKE_TRACEBACK(frame_d8de5593120711397ebcd544a9a5beee, exception_lineno); - } else if (exception_tb->tb_frame != &frame_d8de5593120711397ebcd544a9a5beee->m_frame) { - exception_tb = ADD_TRACEBACK(exception_tb, frame_d8de5593120711397ebcd544a9a5beee, exception_lineno); - } - - // Attaches locals to frame if any. - Nuitka_Frame_AttachLocals( - frame_d8de5593120711397ebcd544a9a5beee, - type_description_1, - par_self, - par_input, - par_target, - par_weight, - var_w_l, - var_intersect, - var_denominator - ); - - - // Release cached frame if used for exception. - if (frame_d8de5593120711397ebcd544a9a5beee == cache_frame_d8de5593120711397ebcd544a9a5beee) { -#if _DEBUG_REFCOUNTS - count_active_frame_cache_instances -= 1; - count_released_frame_cache_instances += 1; -#endif - - Py_DECREF(cache_frame_d8de5593120711397ebcd544a9a5beee); - cache_frame_d8de5593120711397ebcd544a9a5beee = NULL; - } - - assertFrameObject(frame_d8de5593120711397ebcd544a9a5beee); - - // Put the previous frame back on top. - popFrameStack(); - - // Return the error. - goto try_except_handler_1; - - frame_no_exception_1:; - NUITKA_CANNOT_GET_HERE("tried codes exits in all cases"); - return NULL; - // Return handler code: - try_return_handler_1:; - Py_XDECREF(par_self); - par_self = NULL; - Py_XDECREF(par_input); - par_input = NULL; - Py_XDECREF(par_target); - par_target = NULL; - CHECK_OBJECT(par_weight); - Py_DECREF(par_weight); - par_weight = NULL; - Py_XDECREF(var_w_l); - var_w_l = NULL; - Py_XDECREF(var_intersect); - var_intersect = NULL; - Py_XDECREF(var_denominator); - var_denominator = NULL; - goto function_return_exit; - // Exception handler code: - try_except_handler_1:; - exception_keeper_type_1 = exception_type; - exception_keeper_value_1 = exception_value; - exception_keeper_tb_1 = exception_tb; - exception_keeper_lineno_1 = exception_lineno; - exception_type = NULL; - exception_value = NULL; - exception_tb = NULL; - exception_lineno = 0; - - Py_XDECREF(par_self); - par_self = NULL; - Py_XDECREF(par_input); - par_input = NULL; - Py_XDECREF(par_target); - par_target = NULL; - CHECK_OBJECT(par_weight); - Py_DECREF(par_weight); - par_weight = NULL; - Py_XDECREF(var_w_l); - var_w_l = NULL; - Py_XDECREF(var_intersect); - var_intersect = NULL; - Py_XDECREF(var_denominator); - var_denominator = NULL; - // Re-raise. - exception_type = exception_keeper_type_1; - exception_value = exception_keeper_value_1; - exception_tb = exception_keeper_tb_1; - exception_lineno = exception_keeper_lineno_1; - - goto function_exception_exit; - // End of try: - - NUITKA_CANNOT_GET_HERE("Return statement must have exited already."); - return NULL; - -function_exception_exit: - assert(exception_type); - RESTORE_ERROR_OCCURRED(exception_type, exception_value, exception_tb); - - return NULL; - -function_return_exit: - // Function cleanup code if any. - - - // Actual function exit with return value, making sure we did not make - // the error status worse despite non-NULL return. - CHECK_OBJECT(tmp_return_value); - assert(had_error || !ERROR_OCCURRED()); - return tmp_return_value; -} - - -static PyObject *impl_models$unet3d$losses$$$function__13___init__(struct Nuitka_FunctionObject const *self, PyObject **python_pars) { - // Preserve error status for checks -#ifndef __NUITKA_NO_ASSERT__ - NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED(); -#endif - - // Local variable declarations. - PyObject *par_self = python_pars[0]; - PyObject *par_alpha = python_pars[1]; - PyObject *par_beta = python_pars[2]; - struct Nuitka_FrameObject *frame_619124ae3c7c6b52dec6da317ecfa60b; - NUITKA_MAY_BE_UNUSED char const *type_description_1 = NULL; - NUITKA_MAY_BE_UNUSED nuitka_void tmp_unused; - PyObject *exception_type = NULL; - PyObject *exception_value = NULL; - PyTracebackObject *exception_tb = NULL; - NUITKA_MAY_BE_UNUSED int exception_lineno = 0; - bool tmp_result; - static struct Nuitka_FrameObject *cache_frame_619124ae3c7c6b52dec6da317ecfa60b = NULL; - PyObject *tmp_return_value = NULL; - PyObject *exception_keeper_type_1; - PyObject *exception_keeper_value_1; - PyTracebackObject *exception_keeper_tb_1; - NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_1; - - // Actual function body. - // Tried code: - if (isFrameUnusable(cache_frame_619124ae3c7c6b52dec6da317ecfa60b)) { - Py_XDECREF(cache_frame_619124ae3c7c6b52dec6da317ecfa60b); - -#if _DEBUG_REFCOUNTS - if (cache_frame_619124ae3c7c6b52dec6da317ecfa60b == NULL) { - count_active_frame_cache_instances += 1; - } else { - count_released_frame_cache_instances += 1; - } - count_allocated_frame_cache_instances += 1; -#endif - cache_frame_619124ae3c7c6b52dec6da317ecfa60b = MAKE_FUNCTION_FRAME(codeobj_619124ae3c7c6b52dec6da317ecfa60b, module_models$unet3d$losses, sizeof(void *)+sizeof(void *)+sizeof(void *)+sizeof(void *)); -#if _DEBUG_REFCOUNTS - } else { - count_hit_frame_cache_instances += 1; -#endif - } - assert(cache_frame_619124ae3c7c6b52dec6da317ecfa60b->m_type_description == NULL); - frame_619124ae3c7c6b52dec6da317ecfa60b = cache_frame_619124ae3c7c6b52dec6da317ecfa60b; - - // Push the new frame as the currently active one. - pushFrameStack(frame_619124ae3c7c6b52dec6da317ecfa60b); - - // Mark the frame object as in use, ref count 1 will be up for reuse. - assert(Py_REFCNT(frame_619124ae3c7c6b52dec6da317ecfa60b) == 2); // Frame stack - - // Framed code: - { - PyObject *tmp_called_instance_1; - PyObject *tmp_type_arg_name_1; - PyObject *tmp_object_arg_name_1; - PyObject *tmp_call_result_1; - tmp_type_arg_name_1 = GET_STRING_DICT_VALUE(moduledict_models$unet3d$losses, (Nuitka_StringObject *)mod_consts[53]); - - if (unlikely(tmp_type_arg_name_1 == NULL)) { - tmp_type_arg_name_1 = GET_MODULE_VARIABLE_VALUE_FALLBACK(mod_consts[53]); - } - - if (tmp_type_arg_name_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 172; - type_description_1 = "oooN"; - goto frame_exception_exit_1; - } - CHECK_OBJECT(par_self); - tmp_object_arg_name_1 = par_self; - tmp_called_instance_1 = BUILTIN_SUPER2(tmp_type_arg_name_1, tmp_object_arg_name_1); - if (tmp_called_instance_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 172; - type_description_1 = "oooN"; - goto frame_exception_exit_1; - } - frame_619124ae3c7c6b52dec6da317ecfa60b->m_frame.f_lineno = 172; - tmp_call_result_1 = CALL_METHOD_NO_ARGS(tmp_called_instance_1, mod_consts[13]); - Py_DECREF(tmp_called_instance_1); - if (tmp_call_result_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 172; - type_description_1 = "oooN"; - goto frame_exception_exit_1; - } - Py_DECREF(tmp_call_result_1); - } - { - PyObject *tmp_assattr_name_1; - PyObject *tmp_assattr_target_1; - CHECK_OBJECT(par_alpha); - tmp_assattr_name_1 = par_alpha; - CHECK_OBJECT(par_self); - tmp_assattr_target_1 = par_self; - tmp_result = SET_ATTRIBUTE(tmp_assattr_target_1, mod_consts[54], tmp_assattr_name_1); - if (tmp_result == false) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 173; - type_description_1 = "oooN"; - goto frame_exception_exit_1; - } - } - { - PyObject *tmp_assattr_name_2; - PyObject *tmp_called_instance_2; - PyObject *tmp_assattr_target_2; - tmp_called_instance_2 = GET_STRING_DICT_VALUE(moduledict_models$unet3d$losses, (Nuitka_StringObject *)mod_consts[36]); - - if (unlikely(tmp_called_instance_2 == NULL)) { - tmp_called_instance_2 = GET_MODULE_VARIABLE_VALUE_FALLBACK(mod_consts[36]); - } - - if (tmp_called_instance_2 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 174; - type_description_1 = "oooN"; - goto frame_exception_exit_1; - } - frame_619124ae3c7c6b52dec6da317ecfa60b->m_frame.f_lineno = 174; - tmp_assattr_name_2 = CALL_METHOD_NO_ARGS(tmp_called_instance_2, mod_consts[55]); - if (tmp_assattr_name_2 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 174; - type_description_1 = "oooN"; - goto frame_exception_exit_1; - } - CHECK_OBJECT(par_self); - tmp_assattr_target_2 = par_self; - tmp_result = SET_ATTRIBUTE(tmp_assattr_target_2, mod_consts[56], tmp_assattr_name_2); - Py_DECREF(tmp_assattr_name_2); - if (tmp_result == false) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 174; - type_description_1 = "oooN"; - goto frame_exception_exit_1; - } - } - { - PyObject *tmp_assattr_name_3; - PyObject *tmp_assattr_target_3; - CHECK_OBJECT(par_beta); - tmp_assattr_name_3 = par_beta; - CHECK_OBJECT(par_self); - tmp_assattr_target_3 = par_self; - tmp_result = SET_ATTRIBUTE(tmp_assattr_target_3, mod_consts[57], tmp_assattr_name_3); - if (tmp_result == false) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 175; - type_description_1 = "oooN"; - goto frame_exception_exit_1; - } - } - { - PyObject *tmp_assattr_name_4; - PyObject *tmp_called_name_1; - PyObject *tmp_assattr_target_4; - tmp_called_name_1 = GET_STRING_DICT_VALUE(moduledict_models$unet3d$losses, (Nuitka_StringObject *)mod_consts[58]); - - if (unlikely(tmp_called_name_1 == NULL)) { - tmp_called_name_1 = GET_MODULE_VARIABLE_VALUE_FALLBACK(mod_consts[58]); - } - - if (tmp_called_name_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 176; - type_description_1 = "oooN"; - goto frame_exception_exit_1; - } - frame_619124ae3c7c6b52dec6da317ecfa60b->m_frame.f_lineno = 176; - tmp_assattr_name_4 = CALL_FUNCTION_NO_ARGS(tmp_called_name_1); - if (tmp_assattr_name_4 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 176; - type_description_1 = "oooN"; - goto frame_exception_exit_1; - } - CHECK_OBJECT(par_self); - tmp_assattr_target_4 = par_self; - tmp_result = SET_ATTRIBUTE(tmp_assattr_target_4, mod_consts[43], tmp_assattr_name_4); - Py_DECREF(tmp_assattr_name_4); - if (tmp_result == false) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 176; - type_description_1 = "oooN"; - goto frame_exception_exit_1; - } - } - -#if 0 - RESTORE_FRAME_EXCEPTION(frame_619124ae3c7c6b52dec6da317ecfa60b); -#endif - - // Put the previous frame back on top. - popFrameStack(); - - goto frame_no_exception_1; - - frame_exception_exit_1:; - -#if 0 - RESTORE_FRAME_EXCEPTION(frame_619124ae3c7c6b52dec6da317ecfa60b); -#endif - - if (exception_tb == NULL) { - exception_tb = MAKE_TRACEBACK(frame_619124ae3c7c6b52dec6da317ecfa60b, exception_lineno); - } else if (exception_tb->tb_frame != &frame_619124ae3c7c6b52dec6da317ecfa60b->m_frame) { - exception_tb = ADD_TRACEBACK(exception_tb, frame_619124ae3c7c6b52dec6da317ecfa60b, exception_lineno); - } - - // Attaches locals to frame if any. - Nuitka_Frame_AttachLocals( - frame_619124ae3c7c6b52dec6da317ecfa60b, - type_description_1, - par_self, - par_alpha, - par_beta, - NULL - ); - - - // Release cached frame if used for exception. - if (frame_619124ae3c7c6b52dec6da317ecfa60b == cache_frame_619124ae3c7c6b52dec6da317ecfa60b) { -#if _DEBUG_REFCOUNTS - count_active_frame_cache_instances -= 1; - count_released_frame_cache_instances += 1; -#endif - - Py_DECREF(cache_frame_619124ae3c7c6b52dec6da317ecfa60b); - cache_frame_619124ae3c7c6b52dec6da317ecfa60b = NULL; - } - - assertFrameObject(frame_619124ae3c7c6b52dec6da317ecfa60b); - - // Put the previous frame back on top. - popFrameStack(); - - // Return the error. - goto try_except_handler_1; - - frame_no_exception_1:; - tmp_return_value = Py_None; - Py_INCREF(tmp_return_value); - goto try_return_handler_1; - NUITKA_CANNOT_GET_HERE("tried codes exits in all cases"); - return NULL; - // Return handler code: - try_return_handler_1:; - CHECK_OBJECT(par_self); - Py_DECREF(par_self); - par_self = NULL; - CHECK_OBJECT(par_alpha); - Py_DECREF(par_alpha); - par_alpha = NULL; - CHECK_OBJECT(par_beta); - Py_DECREF(par_beta); - par_beta = NULL; - goto function_return_exit; - // Exception handler code: - try_except_handler_1:; - exception_keeper_type_1 = exception_type; - exception_keeper_value_1 = exception_value; - exception_keeper_tb_1 = exception_tb; - exception_keeper_lineno_1 = exception_lineno; - exception_type = NULL; - exception_value = NULL; - exception_tb = NULL; - exception_lineno = 0; - - CHECK_OBJECT(par_self); - Py_DECREF(par_self); - par_self = NULL; - CHECK_OBJECT(par_alpha); - Py_DECREF(par_alpha); - par_alpha = NULL; - CHECK_OBJECT(par_beta); - Py_DECREF(par_beta); - par_beta = NULL; - // Re-raise. - exception_type = exception_keeper_type_1; - exception_value = exception_keeper_value_1; - exception_tb = exception_keeper_tb_1; - exception_lineno = exception_keeper_lineno_1; - - goto function_exception_exit; - // End of try: - - NUITKA_CANNOT_GET_HERE("Return statement must have exited already."); - return NULL; - -function_exception_exit: - assert(exception_type); - RESTORE_ERROR_OCCURRED(exception_type, exception_value, exception_tb); - - return NULL; - -function_return_exit: - // Function cleanup code if any. - - - // Actual function exit with return value, making sure we did not make - // the error status worse despite non-NULL return. - CHECK_OBJECT(tmp_return_value); - assert(had_error || !ERROR_OCCURRED()); - return tmp_return_value; -} - - -static PyObject *impl_models$unet3d$losses$$$function__14_forward(struct Nuitka_FunctionObject const *self, PyObject **python_pars) { - // Preserve error status for checks -#ifndef __NUITKA_NO_ASSERT__ - NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED(); -#endif - - // Local variable declarations. - PyObject *par_self = python_pars[0]; - PyObject *par_input = python_pars[1]; - PyObject *par_target = python_pars[2]; - struct Nuitka_FrameObject *frame_3a3c4357c3d422694cae78ba51b909d4; - NUITKA_MAY_BE_UNUSED char const *type_description_1 = NULL; - PyObject *tmp_return_value = NULL; - PyObject *exception_type = NULL; - PyObject *exception_value = NULL; - PyTracebackObject *exception_tb = NULL; - NUITKA_MAY_BE_UNUSED int exception_lineno = 0; - static struct Nuitka_FrameObject *cache_frame_3a3c4357c3d422694cae78ba51b909d4 = NULL; - PyObject *exception_keeper_type_1; - PyObject *exception_keeper_value_1; - PyTracebackObject *exception_keeper_tb_1; - NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_1; - - // Actual function body. - // Tried code: - if (isFrameUnusable(cache_frame_3a3c4357c3d422694cae78ba51b909d4)) { - Py_XDECREF(cache_frame_3a3c4357c3d422694cae78ba51b909d4); - -#if _DEBUG_REFCOUNTS - if (cache_frame_3a3c4357c3d422694cae78ba51b909d4 == NULL) { - count_active_frame_cache_instances += 1; - } else { - count_released_frame_cache_instances += 1; - } - count_allocated_frame_cache_instances += 1; -#endif - cache_frame_3a3c4357c3d422694cae78ba51b909d4 = MAKE_FUNCTION_FRAME(codeobj_3a3c4357c3d422694cae78ba51b909d4, module_models$unet3d$losses, sizeof(void *)+sizeof(void *)+sizeof(void *)); -#if _DEBUG_REFCOUNTS - } else { - count_hit_frame_cache_instances += 1; -#endif - } - assert(cache_frame_3a3c4357c3d422694cae78ba51b909d4->m_type_description == NULL); - frame_3a3c4357c3d422694cae78ba51b909d4 = cache_frame_3a3c4357c3d422694cae78ba51b909d4; - - // Push the new frame as the currently active one. - pushFrameStack(frame_3a3c4357c3d422694cae78ba51b909d4); - - // Mark the frame object as in use, ref count 1 will be up for reuse. - assert(Py_REFCNT(frame_3a3c4357c3d422694cae78ba51b909d4) == 2); // Frame stack - - // Framed code: - { - PyObject *tmp_left_name_1; - PyObject *tmp_left_name_2; - PyObject *tmp_expression_name_1; - PyObject *tmp_right_name_1; - PyObject *tmp_called_instance_1; - PyObject *tmp_args_element_name_1; - PyObject *tmp_args_element_name_2; - PyObject *tmp_right_name_2; - PyObject *tmp_left_name_3; - PyObject *tmp_expression_name_2; - PyObject *tmp_right_name_3; - PyObject *tmp_called_name_1; - PyObject *tmp_expression_name_3; - PyObject *tmp_args_element_name_3; - PyObject *tmp_args_element_name_4; - CHECK_OBJECT(par_self); - tmp_expression_name_1 = par_self; - tmp_left_name_2 = LOOKUP_ATTRIBUTE(tmp_expression_name_1, mod_consts[54]); - if (tmp_left_name_2 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 179; - type_description_1 = "ooo"; - goto frame_exception_exit_1; - } - if (par_self == NULL) { - Py_DECREF(tmp_left_name_2); - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[21]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - exception_lineno = 179; - type_description_1 = "ooo"; - goto frame_exception_exit_1; - } - - tmp_called_instance_1 = par_self; - CHECK_OBJECT(par_input); - tmp_args_element_name_1 = par_input; - CHECK_OBJECT(par_target); - tmp_args_element_name_2 = par_target; - frame_3a3c4357c3d422694cae78ba51b909d4->m_frame.f_lineno = 179; - { - PyObject *call_args[] = {tmp_args_element_name_1, tmp_args_element_name_2}; - tmp_right_name_1 = CALL_METHOD_WITH_ARGS2( - tmp_called_instance_1, - mod_consts[56], - call_args - ); - } - - if (tmp_right_name_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - Py_DECREF(tmp_left_name_2); - - exception_lineno = 179; - type_description_1 = "ooo"; - goto frame_exception_exit_1; - } - tmp_left_name_1 = BINARY_OPERATION_MULT_OBJECT_OBJECT_OBJECT(tmp_left_name_2, tmp_right_name_1); - Py_DECREF(tmp_left_name_2); - Py_DECREF(tmp_right_name_1); - if (tmp_left_name_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 179; - type_description_1 = "ooo"; - goto frame_exception_exit_1; - } - if (par_self == NULL) { - Py_DECREF(tmp_left_name_1); - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[21]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - exception_lineno = 179; - type_description_1 = "ooo"; - goto frame_exception_exit_1; - } - - tmp_expression_name_2 = par_self; - tmp_left_name_3 = LOOKUP_ATTRIBUTE(tmp_expression_name_2, mod_consts[57]); - if (tmp_left_name_3 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - Py_DECREF(tmp_left_name_1); - - exception_lineno = 179; - type_description_1 = "ooo"; - goto frame_exception_exit_1; - } - if (par_self == NULL) { - Py_DECREF(tmp_left_name_1); - Py_DECREF(tmp_left_name_3); - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[21]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - exception_lineno = 179; - type_description_1 = "ooo"; - goto frame_exception_exit_1; - } - - tmp_expression_name_3 = par_self; - tmp_called_name_1 = LOOKUP_ATTRIBUTE(tmp_expression_name_3, mod_consts[43]); - if (tmp_called_name_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - Py_DECREF(tmp_left_name_1); - Py_DECREF(tmp_left_name_3); - - exception_lineno = 179; - type_description_1 = "ooo"; - goto frame_exception_exit_1; - } - if (par_input == NULL) { - Py_DECREF(tmp_left_name_1); - Py_DECREF(tmp_left_name_3); - Py_DECREF(tmp_called_name_1); - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[3]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - exception_lineno = 179; - type_description_1 = "ooo"; - goto frame_exception_exit_1; - } - - tmp_args_element_name_3 = par_input; - if (par_target == NULL) { - Py_DECREF(tmp_left_name_1); - Py_DECREF(tmp_left_name_3); - Py_DECREF(tmp_called_name_1); - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[4]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - exception_lineno = 179; - type_description_1 = "ooo"; - goto frame_exception_exit_1; - } - - tmp_args_element_name_4 = par_target; - frame_3a3c4357c3d422694cae78ba51b909d4->m_frame.f_lineno = 179; - { - PyObject *call_args[] = {tmp_args_element_name_3, tmp_args_element_name_4}; - tmp_right_name_3 = CALL_FUNCTION_WITH_ARGS2(tmp_called_name_1, call_args); - } - - Py_DECREF(tmp_called_name_1); - if (tmp_right_name_3 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - Py_DECREF(tmp_left_name_1); - Py_DECREF(tmp_left_name_3); - - exception_lineno = 179; - type_description_1 = "ooo"; - goto frame_exception_exit_1; - } - tmp_right_name_2 = BINARY_OPERATION_MULT_OBJECT_OBJECT_OBJECT(tmp_left_name_3, tmp_right_name_3); - Py_DECREF(tmp_left_name_3); - Py_DECREF(tmp_right_name_3); - if (tmp_right_name_2 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - Py_DECREF(tmp_left_name_1); - - exception_lineno = 179; - type_description_1 = "ooo"; - goto frame_exception_exit_1; - } - tmp_return_value = BINARY_OPERATION_ADD_OBJECT_OBJECT_OBJECT(tmp_left_name_1, tmp_right_name_2); - Py_DECREF(tmp_left_name_1); - Py_DECREF(tmp_right_name_2); - if (tmp_return_value == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 179; - type_description_1 = "ooo"; - goto frame_exception_exit_1; - } - goto frame_return_exit_1; - } - -#if 0 - RESTORE_FRAME_EXCEPTION(frame_3a3c4357c3d422694cae78ba51b909d4); -#endif - - // Put the previous frame back on top. - popFrameStack(); - - goto frame_no_exception_1; - - frame_return_exit_1:; -#if 0 - RESTORE_FRAME_EXCEPTION(frame_3a3c4357c3d422694cae78ba51b909d4); -#endif - - // Put the previous frame back on top. - popFrameStack(); - - goto try_return_handler_1; - - frame_exception_exit_1:; - -#if 0 - RESTORE_FRAME_EXCEPTION(frame_3a3c4357c3d422694cae78ba51b909d4); -#endif - - if (exception_tb == NULL) { - exception_tb = MAKE_TRACEBACK(frame_3a3c4357c3d422694cae78ba51b909d4, exception_lineno); - } else if (exception_tb->tb_frame != &frame_3a3c4357c3d422694cae78ba51b909d4->m_frame) { - exception_tb = ADD_TRACEBACK(exception_tb, frame_3a3c4357c3d422694cae78ba51b909d4, exception_lineno); - } - - // Attaches locals to frame if any. - Nuitka_Frame_AttachLocals( - frame_3a3c4357c3d422694cae78ba51b909d4, - type_description_1, - par_self, - par_input, - par_target - ); - - - // Release cached frame if used for exception. - if (frame_3a3c4357c3d422694cae78ba51b909d4 == cache_frame_3a3c4357c3d422694cae78ba51b909d4) { -#if _DEBUG_REFCOUNTS - count_active_frame_cache_instances -= 1; - count_released_frame_cache_instances += 1; -#endif - - Py_DECREF(cache_frame_3a3c4357c3d422694cae78ba51b909d4); - cache_frame_3a3c4357c3d422694cae78ba51b909d4 = NULL; - } - - assertFrameObject(frame_3a3c4357c3d422694cae78ba51b909d4); - - // Put the previous frame back on top. - popFrameStack(); - - // Return the error. - goto try_except_handler_1; - - frame_no_exception_1:; - NUITKA_CANNOT_GET_HERE("tried codes exits in all cases"); - return NULL; - // Return handler code: - try_return_handler_1:; - Py_XDECREF(par_self); - par_self = NULL; - Py_XDECREF(par_input); - par_input = NULL; - Py_XDECREF(par_target); - par_target = NULL; - goto function_return_exit; - // Exception handler code: - try_except_handler_1:; - exception_keeper_type_1 = exception_type; - exception_keeper_value_1 = exception_value; - exception_keeper_tb_1 = exception_tb; - exception_keeper_lineno_1 = exception_lineno; - exception_type = NULL; - exception_value = NULL; - exception_tb = NULL; - exception_lineno = 0; - - Py_XDECREF(par_self); - par_self = NULL; - Py_XDECREF(par_input); - par_input = NULL; - Py_XDECREF(par_target); - par_target = NULL; - // Re-raise. - exception_type = exception_keeper_type_1; - exception_value = exception_keeper_value_1; - exception_tb = exception_keeper_tb_1; - exception_lineno = exception_keeper_lineno_1; - - goto function_exception_exit; - // End of try: - - NUITKA_CANNOT_GET_HERE("Return statement must have exited already."); - return NULL; - -function_exception_exit: - assert(exception_type); - RESTORE_ERROR_OCCURRED(exception_type, exception_value, exception_tb); - - return NULL; - -function_return_exit: - // Function cleanup code if any. - - - // Actual function exit with return value, making sure we did not make - // the error status worse despite non-NULL return. - CHECK_OBJECT(tmp_return_value); - assert(had_error || !ERROR_OCCURRED()); - return tmp_return_value; -} - - -static PyObject *impl_models$unet3d$losses$$$function__15___init__(struct Nuitka_FunctionObject const *self, PyObject **python_pars) { - // Preserve error status for checks -#ifndef __NUITKA_NO_ASSERT__ - NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED(); -#endif - - // Local variable declarations. - PyObject *par_self = python_pars[0]; - PyObject *par_ignore_index = python_pars[1]; - struct Nuitka_FrameObject *frame_45f52b2af41ae9eeda8b8dceada0ce54; - NUITKA_MAY_BE_UNUSED char const *type_description_1 = NULL; - NUITKA_MAY_BE_UNUSED nuitka_void tmp_unused; - PyObject *exception_type = NULL; - PyObject *exception_value = NULL; - PyTracebackObject *exception_tb = NULL; - NUITKA_MAY_BE_UNUSED int exception_lineno = 0; - bool tmp_result; - static struct Nuitka_FrameObject *cache_frame_45f52b2af41ae9eeda8b8dceada0ce54 = NULL; - PyObject *tmp_return_value = NULL; - PyObject *exception_keeper_type_1; - PyObject *exception_keeper_value_1; - PyTracebackObject *exception_keeper_tb_1; - NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_1; - - // Actual function body. - // Tried code: - if (isFrameUnusable(cache_frame_45f52b2af41ae9eeda8b8dceada0ce54)) { - Py_XDECREF(cache_frame_45f52b2af41ae9eeda8b8dceada0ce54); - -#if _DEBUG_REFCOUNTS - if (cache_frame_45f52b2af41ae9eeda8b8dceada0ce54 == NULL) { - count_active_frame_cache_instances += 1; - } else { - count_released_frame_cache_instances += 1; - } - count_allocated_frame_cache_instances += 1; -#endif - cache_frame_45f52b2af41ae9eeda8b8dceada0ce54 = MAKE_FUNCTION_FRAME(codeobj_45f52b2af41ae9eeda8b8dceada0ce54, module_models$unet3d$losses, sizeof(void *)+sizeof(void *)+sizeof(void *)); -#if _DEBUG_REFCOUNTS - } else { - count_hit_frame_cache_instances += 1; -#endif - } - assert(cache_frame_45f52b2af41ae9eeda8b8dceada0ce54->m_type_description == NULL); - frame_45f52b2af41ae9eeda8b8dceada0ce54 = cache_frame_45f52b2af41ae9eeda8b8dceada0ce54; - - // Push the new frame as the currently active one. - pushFrameStack(frame_45f52b2af41ae9eeda8b8dceada0ce54); - - // Mark the frame object as in use, ref count 1 will be up for reuse. - assert(Py_REFCNT(frame_45f52b2af41ae9eeda8b8dceada0ce54) == 2); // Frame stack - - // Framed code: - { - PyObject *tmp_called_instance_1; - PyObject *tmp_type_arg_name_1; - PyObject *tmp_object_arg_name_1; - PyObject *tmp_call_result_1; - tmp_type_arg_name_1 = GET_STRING_DICT_VALUE(moduledict_models$unet3d$losses, (Nuitka_StringObject *)mod_consts[59]); - - if (unlikely(tmp_type_arg_name_1 == NULL)) { - tmp_type_arg_name_1 = GET_MODULE_VARIABLE_VALUE_FALLBACK(mod_consts[59]); - } - - if (tmp_type_arg_name_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 187; - type_description_1 = "ooN"; - goto frame_exception_exit_1; - } - CHECK_OBJECT(par_self); - tmp_object_arg_name_1 = par_self; - tmp_called_instance_1 = BUILTIN_SUPER2(tmp_type_arg_name_1, tmp_object_arg_name_1); - if (tmp_called_instance_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 187; - type_description_1 = "ooN"; - goto frame_exception_exit_1; - } - frame_45f52b2af41ae9eeda8b8dceada0ce54->m_frame.f_lineno = 187; - tmp_call_result_1 = CALL_METHOD_NO_ARGS(tmp_called_instance_1, mod_consts[13]); - Py_DECREF(tmp_called_instance_1); - if (tmp_call_result_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 187; - type_description_1 = "ooN"; - goto frame_exception_exit_1; - } - Py_DECREF(tmp_call_result_1); - } - { - PyObject *tmp_assattr_name_1; - PyObject *tmp_assattr_target_1; - CHECK_OBJECT(par_ignore_index); - tmp_assattr_name_1 = par_ignore_index; - CHECK_OBJECT(par_self); - tmp_assattr_target_1 = par_self; - tmp_result = SET_ATTRIBUTE(tmp_assattr_target_1, mod_consts[16], tmp_assattr_name_1); - if (tmp_result == false) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 188; - type_description_1 = "ooN"; - goto frame_exception_exit_1; - } - } - -#if 0 - RESTORE_FRAME_EXCEPTION(frame_45f52b2af41ae9eeda8b8dceada0ce54); -#endif - - // Put the previous frame back on top. - popFrameStack(); - - goto frame_no_exception_1; - - frame_exception_exit_1:; - -#if 0 - RESTORE_FRAME_EXCEPTION(frame_45f52b2af41ae9eeda8b8dceada0ce54); -#endif - - if (exception_tb == NULL) { - exception_tb = MAKE_TRACEBACK(frame_45f52b2af41ae9eeda8b8dceada0ce54, exception_lineno); - } else if (exception_tb->tb_frame != &frame_45f52b2af41ae9eeda8b8dceada0ce54->m_frame) { - exception_tb = ADD_TRACEBACK(exception_tb, frame_45f52b2af41ae9eeda8b8dceada0ce54, exception_lineno); - } - - // Attaches locals to frame if any. - Nuitka_Frame_AttachLocals( - frame_45f52b2af41ae9eeda8b8dceada0ce54, - type_description_1, - par_self, - par_ignore_index, - NULL - ); - - - // Release cached frame if used for exception. - if (frame_45f52b2af41ae9eeda8b8dceada0ce54 == cache_frame_45f52b2af41ae9eeda8b8dceada0ce54) { -#if _DEBUG_REFCOUNTS - count_active_frame_cache_instances -= 1; - count_released_frame_cache_instances += 1; -#endif - - Py_DECREF(cache_frame_45f52b2af41ae9eeda8b8dceada0ce54); - cache_frame_45f52b2af41ae9eeda8b8dceada0ce54 = NULL; - } - - assertFrameObject(frame_45f52b2af41ae9eeda8b8dceada0ce54); - - // Put the previous frame back on top. - popFrameStack(); - - // Return the error. - goto try_except_handler_1; - - frame_no_exception_1:; - tmp_return_value = Py_None; - Py_INCREF(tmp_return_value); - goto try_return_handler_1; - NUITKA_CANNOT_GET_HERE("tried codes exits in all cases"); - return NULL; - // Return handler code: - try_return_handler_1:; - CHECK_OBJECT(par_self); - Py_DECREF(par_self); - par_self = NULL; - CHECK_OBJECT(par_ignore_index); - Py_DECREF(par_ignore_index); - par_ignore_index = NULL; - goto function_return_exit; - // Exception handler code: - try_except_handler_1:; - exception_keeper_type_1 = exception_type; - exception_keeper_value_1 = exception_value; - exception_keeper_tb_1 = exception_tb; - exception_keeper_lineno_1 = exception_lineno; - exception_type = NULL; - exception_value = NULL; - exception_tb = NULL; - exception_lineno = 0; - - CHECK_OBJECT(par_self); - Py_DECREF(par_self); - par_self = NULL; - CHECK_OBJECT(par_ignore_index); - Py_DECREF(par_ignore_index); - par_ignore_index = NULL; - // Re-raise. - exception_type = exception_keeper_type_1; - exception_value = exception_keeper_value_1; - exception_tb = exception_keeper_tb_1; - exception_lineno = exception_keeper_lineno_1; - - goto function_exception_exit; - // End of try: - - NUITKA_CANNOT_GET_HERE("Return statement must have exited already."); - return NULL; - -function_exception_exit: - assert(exception_type); - RESTORE_ERROR_OCCURRED(exception_type, exception_value, exception_tb); - - return NULL; - -function_return_exit: - // Function cleanup code if any. - - - // Actual function exit with return value, making sure we did not make - // the error status worse despite non-NULL return. - CHECK_OBJECT(tmp_return_value); - assert(had_error || !ERROR_OCCURRED()); - return tmp_return_value; -} - - -static PyObject *impl_models$unet3d$losses$$$function__16_forward(struct Nuitka_FunctionObject const *self, PyObject **python_pars) { - // Preserve error status for checks -#ifndef __NUITKA_NO_ASSERT__ - NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED(); -#endif - - // Local variable declarations. - PyObject *par_self = python_pars[0]; - PyObject *par_input = python_pars[1]; - PyObject *par_target = python_pars[2]; - PyObject *var_weight = NULL; - struct Nuitka_FrameObject *frame_d0a908219576feca58e31d68600ccb1c; - NUITKA_MAY_BE_UNUSED char const *type_description_1 = NULL; - PyObject *exception_type = NULL; - PyObject *exception_value = NULL; - PyTracebackObject *exception_tb = NULL; - NUITKA_MAY_BE_UNUSED int exception_lineno = 0; - PyObject *tmp_return_value = NULL; - int tmp_res; - static struct Nuitka_FrameObject *cache_frame_d0a908219576feca58e31d68600ccb1c = NULL; - PyObject *exception_keeper_type_1; - PyObject *exception_keeper_value_1; - PyTracebackObject *exception_keeper_tb_1; - NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_1; - - // Actual function body. - // Tried code: - if (isFrameUnusable(cache_frame_d0a908219576feca58e31d68600ccb1c)) { - Py_XDECREF(cache_frame_d0a908219576feca58e31d68600ccb1c); - -#if _DEBUG_REFCOUNTS - if (cache_frame_d0a908219576feca58e31d68600ccb1c == NULL) { - count_active_frame_cache_instances += 1; - } else { - count_released_frame_cache_instances += 1; - } - count_allocated_frame_cache_instances += 1; -#endif - cache_frame_d0a908219576feca58e31d68600ccb1c = MAKE_FUNCTION_FRAME(codeobj_d0a908219576feca58e31d68600ccb1c, module_models$unet3d$losses, sizeof(void *)+sizeof(void *)+sizeof(void *)+sizeof(void *)); -#if _DEBUG_REFCOUNTS - } else { - count_hit_frame_cache_instances += 1; -#endif - } - assert(cache_frame_d0a908219576feca58e31d68600ccb1c->m_type_description == NULL); - frame_d0a908219576feca58e31d68600ccb1c = cache_frame_d0a908219576feca58e31d68600ccb1c; - - // Push the new frame as the currently active one. - pushFrameStack(frame_d0a908219576feca58e31d68600ccb1c); - - // Mark the frame object as in use, ref count 1 will be up for reuse. - assert(Py_REFCNT(frame_d0a908219576feca58e31d68600ccb1c) == 2); // Frame stack - - // Framed code: - { - PyObject *tmp_assign_source_1; - PyObject *tmp_called_instance_1; - PyObject *tmp_args_element_name_1; - CHECK_OBJECT(par_self); - tmp_called_instance_1 = par_self; - CHECK_OBJECT(par_input); - tmp_args_element_name_1 = par_input; - frame_d0a908219576feca58e31d68600ccb1c->m_frame.f_lineno = 191; - tmp_assign_source_1 = CALL_METHOD_WITH_SINGLE_ARG(tmp_called_instance_1, mod_consts[60], tmp_args_element_name_1); - if (tmp_assign_source_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 191; - type_description_1 = "oooo"; - goto frame_exception_exit_1; - } - assert(var_weight == NULL); - var_weight = tmp_assign_source_1; - } - { - PyObject *tmp_called_name_1; - PyObject *tmp_expression_name_1; - PyObject *tmp_args_name_1; - PyObject *tmp_tuple_element_1; - PyObject *tmp_kwargs_name_1; - PyObject *tmp_dict_key_1; - PyObject *tmp_dict_value_1; - tmp_expression_name_1 = GET_STRING_DICT_VALUE(moduledict_models$unet3d$losses, (Nuitka_StringObject *)mod_consts[61]); - - if (unlikely(tmp_expression_name_1 == NULL)) { - tmp_expression_name_1 = GET_MODULE_VARIABLE_VALUE_FALLBACK(mod_consts[61]); - } - - if (tmp_expression_name_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 192; - type_description_1 = "oooo"; - goto frame_exception_exit_1; - } - tmp_called_name_1 = LOOKUP_ATTRIBUTE(tmp_expression_name_1, mod_consts[62]); - if (tmp_called_name_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 192; - type_description_1 = "oooo"; - goto frame_exception_exit_1; - } - if (par_input == NULL) { - Py_DECREF(tmp_called_name_1); - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[3]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - exception_lineno = 192; - type_description_1 = "oooo"; - goto frame_exception_exit_1; - } - - tmp_tuple_element_1 = par_input; - tmp_args_name_1 = PyTuple_New(2); - PyTuple_SET_ITEM0(tmp_args_name_1, 0, tmp_tuple_element_1); - CHECK_OBJECT(par_target); - tmp_tuple_element_1 = par_target; - PyTuple_SET_ITEM0(tmp_args_name_1, 1, tmp_tuple_element_1); - tmp_dict_key_1 = mod_consts[33]; - CHECK_OBJECT(var_weight); - tmp_dict_value_1 = var_weight; - tmp_kwargs_name_1 = _PyDict_NewPresized( 2 ); - { - PyObject *tmp_expression_name_2; - tmp_res = PyDict_SetItem(tmp_kwargs_name_1, tmp_dict_key_1, tmp_dict_value_1); - assert(!(tmp_res != 0)); - tmp_dict_key_1 = mod_consts[16]; - if (par_self == NULL) { - - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[21]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - exception_lineno = 192; - type_description_1 = "oooo"; - goto dict_build_exception_1; - } - - tmp_expression_name_2 = par_self; - tmp_dict_value_1 = LOOKUP_ATTRIBUTE(tmp_expression_name_2, mod_consts[16]); - if (tmp_dict_value_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 192; - type_description_1 = "oooo"; - goto dict_build_exception_1; - } - tmp_res = PyDict_SetItem(tmp_kwargs_name_1, tmp_dict_key_1, tmp_dict_value_1); - Py_DECREF(tmp_dict_value_1); - assert(!(tmp_res != 0)); - } - goto dict_build_noexception_1; - // Exception handling pass through code for dict_build: - dict_build_exception_1:; - Py_DECREF(tmp_called_name_1); - Py_DECREF(tmp_args_name_1); - Py_DECREF(tmp_kwargs_name_1); - goto frame_exception_exit_1; - // Finished with no exception for dict_build: - dict_build_noexception_1:; - frame_d0a908219576feca58e31d68600ccb1c->m_frame.f_lineno = 192; - tmp_return_value = CALL_FUNCTION(tmp_called_name_1, tmp_args_name_1, tmp_kwargs_name_1); - Py_DECREF(tmp_called_name_1); - Py_DECREF(tmp_args_name_1); - Py_DECREF(tmp_kwargs_name_1); - if (tmp_return_value == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 192; - type_description_1 = "oooo"; - goto frame_exception_exit_1; - } - goto frame_return_exit_1; - } - -#if 0 - RESTORE_FRAME_EXCEPTION(frame_d0a908219576feca58e31d68600ccb1c); -#endif - - // Put the previous frame back on top. - popFrameStack(); - - goto frame_no_exception_1; - - frame_return_exit_1:; -#if 0 - RESTORE_FRAME_EXCEPTION(frame_d0a908219576feca58e31d68600ccb1c); -#endif - - // Put the previous frame back on top. - popFrameStack(); - - goto try_return_handler_1; - - frame_exception_exit_1:; - -#if 0 - RESTORE_FRAME_EXCEPTION(frame_d0a908219576feca58e31d68600ccb1c); -#endif - - if (exception_tb == NULL) { - exception_tb = MAKE_TRACEBACK(frame_d0a908219576feca58e31d68600ccb1c, exception_lineno); - } else if (exception_tb->tb_frame != &frame_d0a908219576feca58e31d68600ccb1c->m_frame) { - exception_tb = ADD_TRACEBACK(exception_tb, frame_d0a908219576feca58e31d68600ccb1c, exception_lineno); - } - - // Attaches locals to frame if any. - Nuitka_Frame_AttachLocals( - frame_d0a908219576feca58e31d68600ccb1c, - type_description_1, - par_self, - par_input, - par_target, - var_weight - ); - - - // Release cached frame if used for exception. - if (frame_d0a908219576feca58e31d68600ccb1c == cache_frame_d0a908219576feca58e31d68600ccb1c) { -#if _DEBUG_REFCOUNTS - count_active_frame_cache_instances -= 1; - count_released_frame_cache_instances += 1; -#endif - - Py_DECREF(cache_frame_d0a908219576feca58e31d68600ccb1c); - cache_frame_d0a908219576feca58e31d68600ccb1c = NULL; - } - - assertFrameObject(frame_d0a908219576feca58e31d68600ccb1c); - - // Put the previous frame back on top. - popFrameStack(); - - // Return the error. - goto try_except_handler_1; - - frame_no_exception_1:; - NUITKA_CANNOT_GET_HERE("tried codes exits in all cases"); - return NULL; - // Return handler code: - try_return_handler_1:; - Py_XDECREF(par_self); - par_self = NULL; - Py_XDECREF(par_input); - par_input = NULL; - Py_XDECREF(par_target); - par_target = NULL; - Py_XDECREF(var_weight); - var_weight = NULL; - goto function_return_exit; - // Exception handler code: - try_except_handler_1:; - exception_keeper_type_1 = exception_type; - exception_keeper_value_1 = exception_value; - exception_keeper_tb_1 = exception_tb; - exception_keeper_lineno_1 = exception_lineno; - exception_type = NULL; - exception_value = NULL; - exception_tb = NULL; - exception_lineno = 0; - - Py_XDECREF(par_self); - par_self = NULL; - Py_XDECREF(par_input); - par_input = NULL; - Py_XDECREF(par_target); - par_target = NULL; - Py_XDECREF(var_weight); - var_weight = NULL; - // Re-raise. - exception_type = exception_keeper_type_1; - exception_value = exception_keeper_value_1; - exception_tb = exception_keeper_tb_1; - exception_lineno = exception_keeper_lineno_1; - - goto function_exception_exit; - // End of try: - - NUITKA_CANNOT_GET_HERE("Return statement must have exited already."); - return NULL; - -function_exception_exit: - assert(exception_type); - RESTORE_ERROR_OCCURRED(exception_type, exception_value, exception_tb); - - return NULL; - -function_return_exit: - // Function cleanup code if any. - - - // Actual function exit with return value, making sure we did not make - // the error status worse despite non-NULL return. - CHECK_OBJECT(tmp_return_value); - assert(had_error || !ERROR_OCCURRED()); - return tmp_return_value; -} - - -static PyObject *impl_models$unet3d$losses$$$function__17__class_weights(struct Nuitka_FunctionObject const *self, PyObject **python_pars) { - // Preserve error status for checks -#ifndef __NUITKA_NO_ASSERT__ - NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED(); -#endif - - // Local variable declarations. - PyObject *par_input = python_pars[0]; - PyObject *var_flattened = NULL; - PyObject *var_nominator = NULL; - PyObject *var_denominator = NULL; - PyObject *var_class_weights = NULL; - struct Nuitka_FrameObject *frame_c60e6b0b6cbf537f64facb5040a84769; - NUITKA_MAY_BE_UNUSED char const *type_description_1 = NULL; - PyObject *exception_type = NULL; - PyObject *exception_value = NULL; - PyTracebackObject *exception_tb = NULL; - NUITKA_MAY_BE_UNUSED int exception_lineno = 0; - static struct Nuitka_FrameObject *cache_frame_c60e6b0b6cbf537f64facb5040a84769 = NULL; - PyObject *tmp_return_value = NULL; - PyObject *exception_keeper_type_1; - PyObject *exception_keeper_value_1; - PyTracebackObject *exception_keeper_tb_1; - NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_1; - - // Actual function body. - // Tried code: - if (isFrameUnusable(cache_frame_c60e6b0b6cbf537f64facb5040a84769)) { - Py_XDECREF(cache_frame_c60e6b0b6cbf537f64facb5040a84769); - -#if _DEBUG_REFCOUNTS - if (cache_frame_c60e6b0b6cbf537f64facb5040a84769 == NULL) { - count_active_frame_cache_instances += 1; - } else { - count_released_frame_cache_instances += 1; - } - count_allocated_frame_cache_instances += 1; -#endif - cache_frame_c60e6b0b6cbf537f64facb5040a84769 = MAKE_FUNCTION_FRAME(codeobj_c60e6b0b6cbf537f64facb5040a84769, module_models$unet3d$losses, sizeof(void *)+sizeof(void *)+sizeof(void *)+sizeof(void *)+sizeof(void *)); -#if _DEBUG_REFCOUNTS - } else { - count_hit_frame_cache_instances += 1; -#endif - } - assert(cache_frame_c60e6b0b6cbf537f64facb5040a84769->m_type_description == NULL); - frame_c60e6b0b6cbf537f64facb5040a84769 = cache_frame_c60e6b0b6cbf537f64facb5040a84769; - - // Push the new frame as the currently active one. - pushFrameStack(frame_c60e6b0b6cbf537f64facb5040a84769); - - // Mark the frame object as in use, ref count 1 will be up for reuse. - assert(Py_REFCNT(frame_c60e6b0b6cbf537f64facb5040a84769) == 2); // Frame stack - - // Framed code: - { - PyObject *tmp_assign_source_1; - PyObject *tmp_called_name_1; - PyObject *tmp_expression_name_1; - PyObject *tmp_args_name_1; - PyObject *tmp_tuple_element_1; - PyObject *tmp_kwargs_name_1; - tmp_expression_name_1 = GET_STRING_DICT_VALUE(moduledict_models$unet3d$losses, (Nuitka_StringObject *)mod_consts[61]); - - if (unlikely(tmp_expression_name_1 == NULL)) { - tmp_expression_name_1 = GET_MODULE_VARIABLE_VALUE_FALLBACK(mod_consts[61]); - } - - if (tmp_expression_name_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 197; - type_description_1 = "ooooo"; - goto frame_exception_exit_1; - } - tmp_called_name_1 = LOOKUP_ATTRIBUTE(tmp_expression_name_1, mod_consts[39]); - if (tmp_called_name_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 197; - type_description_1 = "ooooo"; - goto frame_exception_exit_1; - } - CHECK_OBJECT(par_input); - tmp_tuple_element_1 = par_input; - tmp_args_name_1 = PyTuple_New(1); - PyTuple_SET_ITEM0(tmp_args_name_1, 0, tmp_tuple_element_1); - tmp_kwargs_name_1 = PyDict_Copy(mod_consts[30]); - frame_c60e6b0b6cbf537f64facb5040a84769->m_frame.f_lineno = 197; - tmp_assign_source_1 = CALL_FUNCTION(tmp_called_name_1, tmp_args_name_1, tmp_kwargs_name_1); - Py_DECREF(tmp_called_name_1); - Py_DECREF(tmp_args_name_1); - Py_DECREF(tmp_kwargs_name_1); - if (tmp_assign_source_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 197; - type_description_1 = "ooooo"; - goto frame_exception_exit_1; - } - { - PyObject *old = par_input; - par_input = tmp_assign_source_1; - Py_XDECREF(old); - } - - } - { - PyObject *tmp_assign_source_2; - PyObject *tmp_called_name_2; - PyObject *tmp_args_element_name_1; - tmp_called_name_2 = GET_STRING_DICT_VALUE(moduledict_models$unet3d$losses, (Nuitka_StringObject *)mod_consts[2]); - - if (unlikely(tmp_called_name_2 == NULL)) { - tmp_called_name_2 = GET_MODULE_VARIABLE_VALUE_FALLBACK(mod_consts[2]); - } - - if (tmp_called_name_2 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 198; - type_description_1 = "ooooo"; - goto frame_exception_exit_1; - } - CHECK_OBJECT(par_input); - tmp_args_element_name_1 = par_input; - frame_c60e6b0b6cbf537f64facb5040a84769->m_frame.f_lineno = 198; - tmp_assign_source_2 = CALL_FUNCTION_WITH_SINGLE_ARG(tmp_called_name_2, tmp_args_element_name_1); - if (tmp_assign_source_2 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 198; - type_description_1 = "ooooo"; - goto frame_exception_exit_1; - } - assert(var_flattened == NULL); - var_flattened = tmp_assign_source_2; - } - { - PyObject *tmp_assign_source_3; - PyObject *tmp_called_instance_1; - PyObject *tmp_left_name_1; - PyObject *tmp_right_name_1; - tmp_left_name_1 = mod_consts[44]; - CHECK_OBJECT(var_flattened); - tmp_right_name_1 = var_flattened; - tmp_called_instance_1 = BINARY_OPERATION_SUB_OBJECT_FLOAT_OBJECT(tmp_left_name_1, tmp_right_name_1); - if (tmp_called_instance_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 199; - type_description_1 = "ooooo"; - goto frame_exception_exit_1; - } - frame_c60e6b0b6cbf537f64facb5040a84769->m_frame.f_lineno = 199; - tmp_assign_source_3 = CALL_METHOD_WITH_ARGS1( - tmp_called_instance_1, - mod_consts[6], - &PyTuple_GET_ITEM(mod_consts[7], 0) - ); - - Py_DECREF(tmp_called_instance_1); - if (tmp_assign_source_3 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 199; - type_description_1 = "ooooo"; - goto frame_exception_exit_1; - } - assert(var_nominator == NULL); - var_nominator = tmp_assign_source_3; - } - { - PyObject *tmp_assign_source_4; - PyObject *tmp_called_instance_2; - if (var_flattened == NULL) { - - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[63]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - exception_lineno = 200; - type_description_1 = "ooooo"; - goto frame_exception_exit_1; - } - - tmp_called_instance_2 = var_flattened; - frame_c60e6b0b6cbf537f64facb5040a84769->m_frame.f_lineno = 200; - tmp_assign_source_4 = CALL_METHOD_WITH_ARGS1( - tmp_called_instance_2, - mod_consts[6], - &PyTuple_GET_ITEM(mod_consts[7], 0) - ); - - if (tmp_assign_source_4 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 200; - type_description_1 = "ooooo"; - goto frame_exception_exit_1; - } - assert(var_denominator == NULL); - var_denominator = tmp_assign_source_4; - } - { - PyObject *tmp_assign_source_5; - PyObject *tmp_called_name_3; - PyObject *tmp_args_name_2; - PyObject *tmp_tuple_element_2; - PyObject *tmp_left_name_2; - PyObject *tmp_right_name_2; - PyObject *tmp_kwargs_name_2; - tmp_called_name_3 = GET_STRING_DICT_VALUE(moduledict_models$unet3d$losses, (Nuitka_StringObject *)mod_consts[64]); - - if (unlikely(tmp_called_name_3 == NULL)) { - tmp_called_name_3 = GET_MODULE_VARIABLE_VALUE_FALLBACK(mod_consts[64]); - } - - if (tmp_called_name_3 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 201; - type_description_1 = "ooooo"; - goto frame_exception_exit_1; - } - CHECK_OBJECT(var_nominator); - tmp_left_name_2 = var_nominator; - CHECK_OBJECT(var_denominator); - tmp_right_name_2 = var_denominator; - tmp_tuple_element_2 = BINARY_OPERATION_TRUEDIV_OBJECT_OBJECT_OBJECT(tmp_left_name_2, tmp_right_name_2); - if (tmp_tuple_element_2 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 201; - type_description_1 = "ooooo"; - goto frame_exception_exit_1; - } - tmp_args_name_2 = PyTuple_New(1); - PyTuple_SET_ITEM(tmp_args_name_2, 0, tmp_tuple_element_2); - tmp_kwargs_name_2 = PyDict_Copy(mod_consts[65]); - frame_c60e6b0b6cbf537f64facb5040a84769->m_frame.f_lineno = 201; - tmp_assign_source_5 = CALL_FUNCTION(tmp_called_name_3, tmp_args_name_2, tmp_kwargs_name_2); - Py_DECREF(tmp_args_name_2); - Py_DECREF(tmp_kwargs_name_2); - if (tmp_assign_source_5 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 201; - type_description_1 = "ooooo"; - goto frame_exception_exit_1; - } - assert(var_class_weights == NULL); - var_class_weights = tmp_assign_source_5; - } - -#if 0 - RESTORE_FRAME_EXCEPTION(frame_c60e6b0b6cbf537f64facb5040a84769); -#endif - - // Put the previous frame back on top. - popFrameStack(); - - goto frame_no_exception_1; - - frame_exception_exit_1:; - -#if 0 - RESTORE_FRAME_EXCEPTION(frame_c60e6b0b6cbf537f64facb5040a84769); -#endif - - if (exception_tb == NULL) { - exception_tb = MAKE_TRACEBACK(frame_c60e6b0b6cbf537f64facb5040a84769, exception_lineno); - } else if (exception_tb->tb_frame != &frame_c60e6b0b6cbf537f64facb5040a84769->m_frame) { - exception_tb = ADD_TRACEBACK(exception_tb, frame_c60e6b0b6cbf537f64facb5040a84769, exception_lineno); - } - - // Attaches locals to frame if any. - Nuitka_Frame_AttachLocals( - frame_c60e6b0b6cbf537f64facb5040a84769, - type_description_1, - par_input, - var_flattened, - var_nominator, - var_denominator, - var_class_weights - ); - - - // Release cached frame if used for exception. - if (frame_c60e6b0b6cbf537f64facb5040a84769 == cache_frame_c60e6b0b6cbf537f64facb5040a84769) { -#if _DEBUG_REFCOUNTS - count_active_frame_cache_instances -= 1; - count_released_frame_cache_instances += 1; -#endif - - Py_DECREF(cache_frame_c60e6b0b6cbf537f64facb5040a84769); - cache_frame_c60e6b0b6cbf537f64facb5040a84769 = NULL; - } - - assertFrameObject(frame_c60e6b0b6cbf537f64facb5040a84769); - - // Put the previous frame back on top. - popFrameStack(); - - // Return the error. - goto try_except_handler_1; - - frame_no_exception_1:; - CHECK_OBJECT(var_class_weights); - tmp_return_value = var_class_weights; - Py_INCREF(tmp_return_value); - goto try_return_handler_1; - NUITKA_CANNOT_GET_HERE("tried codes exits in all cases"); - return NULL; - // Return handler code: - try_return_handler_1:; - CHECK_OBJECT(par_input); - Py_DECREF(par_input); - par_input = NULL; - Py_XDECREF(var_flattened); - var_flattened = NULL; - Py_XDECREF(var_nominator); - var_nominator = NULL; - Py_XDECREF(var_denominator); - var_denominator = NULL; - CHECK_OBJECT(var_class_weights); - Py_DECREF(var_class_weights); - var_class_weights = NULL; - goto function_return_exit; - // Exception handler code: - try_except_handler_1:; - exception_keeper_type_1 = exception_type; - exception_keeper_value_1 = exception_value; - exception_keeper_tb_1 = exception_tb; - exception_keeper_lineno_1 = exception_lineno; - exception_type = NULL; - exception_value = NULL; - exception_tb = NULL; - exception_lineno = 0; - - Py_XDECREF(par_input); - par_input = NULL; - Py_XDECREF(var_flattened); - var_flattened = NULL; - Py_XDECREF(var_nominator); - var_nominator = NULL; - Py_XDECREF(var_denominator); - var_denominator = NULL; - // Re-raise. - exception_type = exception_keeper_type_1; - exception_value = exception_keeper_value_1; - exception_tb = exception_keeper_tb_1; - exception_lineno = exception_keeper_lineno_1; - - goto function_exception_exit; - // End of try: - - NUITKA_CANNOT_GET_HERE("Return statement must have exited already."); - return NULL; - -function_exception_exit: - assert(exception_type); - RESTORE_ERROR_OCCURRED(exception_type, exception_value, exception_tb); - - return NULL; - -function_return_exit: - // Function cleanup code if any. - - - // Actual function exit with return value, making sure we did not make - // the error status worse despite non-NULL return. - CHECK_OBJECT(tmp_return_value); - assert(had_error || !ERROR_OCCURRED()); - return tmp_return_value; -} - - -static PyObject *impl_models$unet3d$losses$$$function__18___init__(struct Nuitka_FunctionObject const *self, PyObject **python_pars) { - // Preserve error status for checks -#ifndef __NUITKA_NO_ASSERT__ - NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED(); -#endif - - // Local variable declarations. - PyObject *par_self = python_pars[0]; - PyObject *par_class_weights = python_pars[1]; - PyObject *par_ignore_index = python_pars[2]; - struct Nuitka_FrameObject *frame_f0147916ca8a0f188f736d2445a24142; - NUITKA_MAY_BE_UNUSED char const *type_description_1 = NULL; - NUITKA_MAY_BE_UNUSED nuitka_void tmp_unused; - PyObject *exception_type = NULL; - PyObject *exception_value = NULL; - PyTracebackObject *exception_tb = NULL; - NUITKA_MAY_BE_UNUSED int exception_lineno = 0; - bool tmp_result; - static struct Nuitka_FrameObject *cache_frame_f0147916ca8a0f188f736d2445a24142 = NULL; - PyObject *tmp_return_value = NULL; - PyObject *exception_keeper_type_1; - PyObject *exception_keeper_value_1; - PyTracebackObject *exception_keeper_tb_1; - NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_1; - - // Actual function body. - // Tried code: - if (isFrameUnusable(cache_frame_f0147916ca8a0f188f736d2445a24142)) { - Py_XDECREF(cache_frame_f0147916ca8a0f188f736d2445a24142); - -#if _DEBUG_REFCOUNTS - if (cache_frame_f0147916ca8a0f188f736d2445a24142 == NULL) { - count_active_frame_cache_instances += 1; - } else { - count_released_frame_cache_instances += 1; - } - count_allocated_frame_cache_instances += 1; -#endif - cache_frame_f0147916ca8a0f188f736d2445a24142 = MAKE_FUNCTION_FRAME(codeobj_f0147916ca8a0f188f736d2445a24142, module_models$unet3d$losses, sizeof(void *)+sizeof(void *)+sizeof(void *)+sizeof(void *)); -#if _DEBUG_REFCOUNTS - } else { - count_hit_frame_cache_instances += 1; -#endif - } - assert(cache_frame_f0147916ca8a0f188f736d2445a24142->m_type_description == NULL); - frame_f0147916ca8a0f188f736d2445a24142 = cache_frame_f0147916ca8a0f188f736d2445a24142; - - // Push the new frame as the currently active one. - pushFrameStack(frame_f0147916ca8a0f188f736d2445a24142); - - // Mark the frame object as in use, ref count 1 will be up for reuse. - assert(Py_REFCNT(frame_f0147916ca8a0f188f736d2445a24142) == 2); // Frame stack - - // Framed code: - { - PyObject *tmp_called_instance_1; - PyObject *tmp_type_arg_name_1; - PyObject *tmp_object_arg_name_1; - PyObject *tmp_call_result_1; - tmp_type_arg_name_1 = GET_STRING_DICT_VALUE(moduledict_models$unet3d$losses, (Nuitka_StringObject *)mod_consts[66]); - - if (unlikely(tmp_type_arg_name_1 == NULL)) { - tmp_type_arg_name_1 = GET_MODULE_VARIABLE_VALUE_FALLBACK(mod_consts[66]); - } - - if (tmp_type_arg_name_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 207; - type_description_1 = "oooN"; - goto frame_exception_exit_1; - } - CHECK_OBJECT(par_self); - tmp_object_arg_name_1 = par_self; - tmp_called_instance_1 = BUILTIN_SUPER2(tmp_type_arg_name_1, tmp_object_arg_name_1); - if (tmp_called_instance_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 207; - type_description_1 = "oooN"; - goto frame_exception_exit_1; - } - frame_f0147916ca8a0f188f736d2445a24142->m_frame.f_lineno = 207; - tmp_call_result_1 = CALL_METHOD_NO_ARGS(tmp_called_instance_1, mod_consts[13]); - Py_DECREF(tmp_called_instance_1); - if (tmp_call_result_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 207; - type_description_1 = "oooN"; - goto frame_exception_exit_1; - } - Py_DECREF(tmp_call_result_1); - } - { - PyObject *tmp_called_instance_2; - PyObject *tmp_call_result_2; - PyObject *tmp_args_element_name_1; - PyObject *tmp_args_element_name_2; - CHECK_OBJECT(par_self); - tmp_called_instance_2 = par_self; - tmp_args_element_name_1 = mod_consts[67]; - CHECK_OBJECT(par_class_weights); - tmp_args_element_name_2 = par_class_weights; - frame_f0147916ca8a0f188f736d2445a24142->m_frame.f_lineno = 208; - { - PyObject *call_args[] = {tmp_args_element_name_1, tmp_args_element_name_2}; - tmp_call_result_2 = CALL_METHOD_WITH_ARGS2( - tmp_called_instance_2, - mod_consts[32], - call_args - ); - } - - if (tmp_call_result_2 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 208; - type_description_1 = "oooN"; - goto frame_exception_exit_1; - } - Py_DECREF(tmp_call_result_2); - } - { - PyObject *tmp_assattr_name_1; - PyObject *tmp_assattr_target_1; - CHECK_OBJECT(par_ignore_index); - tmp_assattr_name_1 = par_ignore_index; - if (par_self == NULL) { - - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[21]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - exception_lineno = 209; - type_description_1 = "oooN"; - goto frame_exception_exit_1; - } - - tmp_assattr_target_1 = par_self; - tmp_result = SET_ATTRIBUTE(tmp_assattr_target_1, mod_consts[16], tmp_assattr_name_1); - if (tmp_result == false) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 209; - type_description_1 = "oooN"; - goto frame_exception_exit_1; - } - } - { - PyObject *tmp_assattr_name_2; - PyObject *tmp_called_name_1; - PyObject *tmp_expression_name_1; - PyObject *tmp_kwargs_name_1; - PyObject *tmp_assattr_target_2; - tmp_expression_name_1 = GET_STRING_DICT_VALUE(moduledict_models$unet3d$losses, (Nuitka_StringObject *)mod_consts[36]); - - if (unlikely(tmp_expression_name_1 == NULL)) { - tmp_expression_name_1 = GET_MODULE_VARIABLE_VALUE_FALLBACK(mod_consts[36]); - } - - if (tmp_expression_name_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 210; - type_description_1 = "oooN"; - goto frame_exception_exit_1; - } - tmp_called_name_1 = LOOKUP_ATTRIBUTE(tmp_expression_name_1, mod_consts[68]); - if (tmp_called_name_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 210; - type_description_1 = "oooN"; - goto frame_exception_exit_1; - } - tmp_kwargs_name_1 = PyDict_Copy(mod_consts[30]); - frame_f0147916ca8a0f188f736d2445a24142->m_frame.f_lineno = 210; - tmp_assattr_name_2 = CALL_FUNCTION_WITH_KEYARGS(tmp_called_name_1, tmp_kwargs_name_1); - Py_DECREF(tmp_called_name_1); - Py_DECREF(tmp_kwargs_name_1); - if (tmp_assattr_name_2 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 210; - type_description_1 = "oooN"; - goto frame_exception_exit_1; - } - if (par_self == NULL) { - Py_DECREF(tmp_assattr_name_2); - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[21]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - exception_lineno = 210; - type_description_1 = "oooN"; - goto frame_exception_exit_1; - } - - tmp_assattr_target_2 = par_self; - tmp_result = SET_ATTRIBUTE(tmp_assattr_target_2, mod_consts[69], tmp_assattr_name_2); - Py_DECREF(tmp_assattr_name_2); - if (tmp_result == false) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 210; - type_description_1 = "oooN"; - goto frame_exception_exit_1; - } - } - -#if 0 - RESTORE_FRAME_EXCEPTION(frame_f0147916ca8a0f188f736d2445a24142); -#endif - - // Put the previous frame back on top. - popFrameStack(); - - goto frame_no_exception_1; - - frame_exception_exit_1:; - -#if 0 - RESTORE_FRAME_EXCEPTION(frame_f0147916ca8a0f188f736d2445a24142); -#endif - - if (exception_tb == NULL) { - exception_tb = MAKE_TRACEBACK(frame_f0147916ca8a0f188f736d2445a24142, exception_lineno); - } else if (exception_tb->tb_frame != &frame_f0147916ca8a0f188f736d2445a24142->m_frame) { - exception_tb = ADD_TRACEBACK(exception_tb, frame_f0147916ca8a0f188f736d2445a24142, exception_lineno); - } - - // Attaches locals to frame if any. - Nuitka_Frame_AttachLocals( - frame_f0147916ca8a0f188f736d2445a24142, - type_description_1, - par_self, - par_class_weights, - par_ignore_index, - NULL - ); - - - // Release cached frame if used for exception. - if (frame_f0147916ca8a0f188f736d2445a24142 == cache_frame_f0147916ca8a0f188f736d2445a24142) { -#if _DEBUG_REFCOUNTS - count_active_frame_cache_instances -= 1; - count_released_frame_cache_instances += 1; -#endif - - Py_DECREF(cache_frame_f0147916ca8a0f188f736d2445a24142); - cache_frame_f0147916ca8a0f188f736d2445a24142 = NULL; - } - - assertFrameObject(frame_f0147916ca8a0f188f736d2445a24142); - - // Put the previous frame back on top. - popFrameStack(); - - // Return the error. - goto try_except_handler_1; - - frame_no_exception_1:; - tmp_return_value = Py_None; - Py_INCREF(tmp_return_value); - goto try_return_handler_1; - NUITKA_CANNOT_GET_HERE("tried codes exits in all cases"); - return NULL; - // Return handler code: - try_return_handler_1:; - Py_XDECREF(par_self); - par_self = NULL; - Py_XDECREF(par_class_weights); - par_class_weights = NULL; - CHECK_OBJECT(par_ignore_index); - Py_DECREF(par_ignore_index); - par_ignore_index = NULL; - goto function_return_exit; - // Exception handler code: - try_except_handler_1:; - exception_keeper_type_1 = exception_type; - exception_keeper_value_1 = exception_value; - exception_keeper_tb_1 = exception_tb; - exception_keeper_lineno_1 = exception_lineno; - exception_type = NULL; - exception_value = NULL; - exception_tb = NULL; - exception_lineno = 0; - - Py_XDECREF(par_self); - par_self = NULL; - Py_XDECREF(par_class_weights); - par_class_weights = NULL; - CHECK_OBJECT(par_ignore_index); - Py_DECREF(par_ignore_index); - par_ignore_index = NULL; - // Re-raise. - exception_type = exception_keeper_type_1; - exception_value = exception_keeper_value_1; - exception_tb = exception_keeper_tb_1; - exception_lineno = exception_keeper_lineno_1; - - goto function_exception_exit; - // End of try: - - NUITKA_CANNOT_GET_HERE("Return statement must have exited already."); - return NULL; - -function_exception_exit: - assert(exception_type); - RESTORE_ERROR_OCCURRED(exception_type, exception_value, exception_tb); - - return NULL; - -function_return_exit: - // Function cleanup code if any. - - - // Actual function exit with return value, making sure we did not make - // the error status worse despite non-NULL return. - CHECK_OBJECT(tmp_return_value); - assert(had_error || !ERROR_OCCURRED()); - return tmp_return_value; -} - - -static PyObject *impl_models$unet3d$losses$$$function__19_forward(struct Nuitka_FunctionObject const *self, PyObject **python_pars) { - // Preserve error status for checks -#ifndef __NUITKA_NO_ASSERT__ - NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED(); -#endif - - // Local variable declarations. - PyObject *par_self = python_pars[0]; - PyObject *par_input = python_pars[1]; - PyObject *par_target = python_pars[2]; - PyObject *par_weights = python_pars[3]; - PyObject *var_log_probabilities = NULL; - PyObject *var_class_weights = NULL; - PyObject *var_result = NULL; - struct Nuitka_FrameObject *frame_ca8b7a4c8713e1d10286835f390e025f; - NUITKA_MAY_BE_UNUSED char const *type_description_1 = NULL; - PyObject *exception_type = NULL; - PyObject *exception_value = NULL; - PyTracebackObject *exception_tb = NULL; - NUITKA_MAY_BE_UNUSED int exception_lineno = 0; - int tmp_res; - PyObject *tmp_return_value = NULL; - static struct Nuitka_FrameObject *cache_frame_ca8b7a4c8713e1d10286835f390e025f = NULL; - PyObject *exception_keeper_type_1; - PyObject *exception_keeper_value_1; - PyTracebackObject *exception_keeper_tb_1; - NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_1; - - // Actual function body. - // Tried code: - if (isFrameUnusable(cache_frame_ca8b7a4c8713e1d10286835f390e025f)) { - Py_XDECREF(cache_frame_ca8b7a4c8713e1d10286835f390e025f); - -#if _DEBUG_REFCOUNTS - if (cache_frame_ca8b7a4c8713e1d10286835f390e025f == NULL) { - count_active_frame_cache_instances += 1; - } else { - count_released_frame_cache_instances += 1; - } - count_allocated_frame_cache_instances += 1; -#endif - cache_frame_ca8b7a4c8713e1d10286835f390e025f = MAKE_FUNCTION_FRAME(codeobj_ca8b7a4c8713e1d10286835f390e025f, module_models$unet3d$losses, sizeof(void *)+sizeof(void *)+sizeof(void *)+sizeof(void *)+sizeof(void *)+sizeof(void *)+sizeof(void *)); -#if _DEBUG_REFCOUNTS - } else { - count_hit_frame_cache_instances += 1; -#endif - } - assert(cache_frame_ca8b7a4c8713e1d10286835f390e025f->m_type_description == NULL); - frame_ca8b7a4c8713e1d10286835f390e025f = cache_frame_ca8b7a4c8713e1d10286835f390e025f; - - // Push the new frame as the currently active one. - pushFrameStack(frame_ca8b7a4c8713e1d10286835f390e025f); - - // Mark the frame object as in use, ref count 1 will be up for reuse. - assert(Py_REFCNT(frame_ca8b7a4c8713e1d10286835f390e025f) == 2); // Frame stack - - // Framed code: - { - nuitka_bool tmp_condition_result_1; - PyObject *tmp_operand_name_1; - PyObject *tmp_compexpr_left_1; - PyObject *tmp_compexpr_right_1; - PyObject *tmp_called_instance_1; - PyObject *tmp_called_instance_2; - CHECK_OBJECT(par_target); - tmp_called_instance_1 = par_target; - frame_ca8b7a4c8713e1d10286835f390e025f->m_frame.f_lineno = 213; - tmp_compexpr_left_1 = CALL_METHOD_NO_ARGS(tmp_called_instance_1, mod_consts[0]); - if (tmp_compexpr_left_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 213; - type_description_1 = "ooooooo"; - goto frame_exception_exit_1; - } - CHECK_OBJECT(par_weights); - tmp_called_instance_2 = par_weights; - frame_ca8b7a4c8713e1d10286835f390e025f->m_frame.f_lineno = 213; - tmp_compexpr_right_1 = CALL_METHOD_NO_ARGS(tmp_called_instance_2, mod_consts[0]); - if (tmp_compexpr_right_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - Py_DECREF(tmp_compexpr_left_1); - - exception_lineno = 213; - type_description_1 = "ooooooo"; - goto frame_exception_exit_1; - } - tmp_operand_name_1 = RICH_COMPARE_EQ_OBJECT_OBJECT_OBJECT(tmp_compexpr_left_1, tmp_compexpr_right_1); - Py_DECREF(tmp_compexpr_left_1); - Py_DECREF(tmp_compexpr_right_1); - if (tmp_operand_name_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 213; - type_description_1 = "ooooooo"; - goto frame_exception_exit_1; - } - tmp_res = CHECK_IF_TRUE(tmp_operand_name_1); - Py_DECREF(tmp_operand_name_1); - if (tmp_res == -1) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 213; - type_description_1 = "ooooooo"; - goto frame_exception_exit_1; - } - tmp_condition_result_1 = (tmp_res == 0) ? NUITKA_BOOL_TRUE : NUITKA_BOOL_FALSE; - if (tmp_condition_result_1 == NUITKA_BOOL_TRUE) { - goto branch_yes_1; - } else { - goto branch_no_1; - } - } - branch_yes_1:; - { - PyObject *tmp_raise_type_1; - tmp_raise_type_1 = PyExc_AssertionError; - exception_type = tmp_raise_type_1; - Py_INCREF(tmp_raise_type_1); - exception_lineno = 213; - RAISE_EXCEPTION_WITH_TYPE(&exception_type, &exception_value, &exception_tb); - type_description_1 = "ooooooo"; - goto frame_exception_exit_1; - } - branch_no_1:; - { - PyObject *tmp_assign_source_1; - PyObject *tmp_called_instance_3; - PyObject *tmp_args_element_name_1; - CHECK_OBJECT(par_self); - tmp_called_instance_3 = par_self; - CHECK_OBJECT(par_input); - tmp_args_element_name_1 = par_input; - frame_ca8b7a4c8713e1d10286835f390e025f->m_frame.f_lineno = 215; - tmp_assign_source_1 = CALL_METHOD_WITH_SINGLE_ARG(tmp_called_instance_3, mod_consts[69], tmp_args_element_name_1); - if (tmp_assign_source_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 215; - type_description_1 = "ooooooo"; - goto frame_exception_exit_1; - } - assert(var_log_probabilities == NULL); - var_log_probabilities = tmp_assign_source_1; - } - { - PyObject *tmp_assign_source_2; - PyObject *tmp_called_name_1; - PyObject *tmp_args_name_1; - PyObject *tmp_tuple_element_1; - PyObject *tmp_kwargs_name_1; - PyObject *tmp_dict_key_1; - PyObject *tmp_dict_value_1; - PyObject *tmp_expression_name_1; - PyObject *tmp_called_instance_4; - PyObject *tmp_subscript_name_1; - tmp_called_name_1 = GET_STRING_DICT_VALUE(moduledict_models$unet3d$losses, (Nuitka_StringObject *)mod_consts[70]); - - if (unlikely(tmp_called_name_1 == NULL)) { - tmp_called_name_1 = GET_MODULE_VARIABLE_VALUE_FALLBACK(mod_consts[70]); - } - - if (tmp_called_name_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 217; - type_description_1 = "ooooooo"; - goto frame_exception_exit_1; - } - if (par_target == NULL) { - - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[4]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - exception_lineno = 217; - type_description_1 = "ooooooo"; - goto frame_exception_exit_1; - } - - tmp_tuple_element_1 = par_target; - tmp_args_name_1 = PyTuple_New(1); - PyTuple_SET_ITEM0(tmp_args_name_1, 0, tmp_tuple_element_1); - tmp_dict_key_1 = mod_consts[71]; - if (par_input == NULL) { - Py_DECREF(tmp_args_name_1); - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[3]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - exception_lineno = 217; - type_description_1 = "ooooooo"; - goto frame_exception_exit_1; - } - - tmp_called_instance_4 = par_input; - frame_ca8b7a4c8713e1d10286835f390e025f->m_frame.f_lineno = 217; - tmp_expression_name_1 = CALL_METHOD_NO_ARGS(tmp_called_instance_4, mod_consts[0]); - if (tmp_expression_name_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - Py_DECREF(tmp_args_name_1); - - exception_lineno = 217; - type_description_1 = "ooooooo"; - goto frame_exception_exit_1; - } - tmp_subscript_name_1 = mod_consts[25]; - tmp_dict_value_1 = LOOKUP_SUBSCRIPT_CONST(tmp_expression_name_1, tmp_subscript_name_1, 1); - Py_DECREF(tmp_expression_name_1); - if (tmp_dict_value_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - Py_DECREF(tmp_args_name_1); - - exception_lineno = 217; - type_description_1 = "ooooooo"; - goto frame_exception_exit_1; - } - tmp_kwargs_name_1 = _PyDict_NewPresized( 2 ); - { - PyObject *tmp_expression_name_2; - tmp_res = PyDict_SetItem(tmp_kwargs_name_1, tmp_dict_key_1, tmp_dict_value_1); - Py_DECREF(tmp_dict_value_1); - assert(!(tmp_res != 0)); - tmp_dict_key_1 = mod_consts[16]; - if (par_self == NULL) { - - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[21]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - exception_lineno = 217; - type_description_1 = "ooooooo"; - goto dict_build_exception_1; - } - - tmp_expression_name_2 = par_self; - tmp_dict_value_1 = LOOKUP_ATTRIBUTE(tmp_expression_name_2, mod_consts[16]); - if (tmp_dict_value_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 217; - type_description_1 = "ooooooo"; - goto dict_build_exception_1; - } - tmp_res = PyDict_SetItem(tmp_kwargs_name_1, tmp_dict_key_1, tmp_dict_value_1); - Py_DECREF(tmp_dict_value_1); - assert(!(tmp_res != 0)); - } - goto dict_build_noexception_1; - // Exception handling pass through code for dict_build: - dict_build_exception_1:; - Py_DECREF(tmp_args_name_1); - Py_DECREF(tmp_kwargs_name_1); - goto frame_exception_exit_1; - // Finished with no exception for dict_build: - dict_build_noexception_1:; - frame_ca8b7a4c8713e1d10286835f390e025f->m_frame.f_lineno = 217; - tmp_assign_source_2 = CALL_FUNCTION(tmp_called_name_1, tmp_args_name_1, tmp_kwargs_name_1); - Py_DECREF(tmp_args_name_1); - Py_DECREF(tmp_kwargs_name_1); - if (tmp_assign_source_2 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 217; - type_description_1 = "ooooooo"; - goto frame_exception_exit_1; - } - { - PyObject *old = par_target; - par_target = tmp_assign_source_2; - Py_XDECREF(old); - } - - } - { - PyObject *tmp_assign_source_3; - PyObject *tmp_called_instance_5; - if (par_weights == NULL) { - - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[72]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - exception_lineno = 219; - type_description_1 = "ooooooo"; - goto frame_exception_exit_1; - } - - tmp_called_instance_5 = par_weights; - frame_ca8b7a4c8713e1d10286835f390e025f->m_frame.f_lineno = 219; - tmp_assign_source_3 = CALL_METHOD_WITH_ARGS1( - tmp_called_instance_5, - mod_consts[73], - &PyTuple_GET_ITEM(mod_consts[24], 0) - ); - - if (tmp_assign_source_3 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 219; - type_description_1 = "ooooooo"; - goto frame_exception_exit_1; - } - { - PyObject *old = par_weights; - par_weights = tmp_assign_source_3; - Py_XDECREF(old); - } - - } - { - PyObject *tmp_assign_source_4; - PyObject *tmp_called_name_2; - PyObject *tmp_expression_name_3; - PyObject *tmp_args_element_name_2; - CHECK_OBJECT(par_weights); - tmp_expression_name_3 = par_weights; - tmp_called_name_2 = LOOKUP_ATTRIBUTE(tmp_expression_name_3, mod_consts[74]); - if (tmp_called_name_2 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 220; - type_description_1 = "ooooooo"; - goto frame_exception_exit_1; - } - if (par_input == NULL) { - Py_DECREF(tmp_called_name_2); - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[3]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - exception_lineno = 220; - type_description_1 = "ooooooo"; - goto frame_exception_exit_1; - } - - tmp_args_element_name_2 = par_input; - frame_ca8b7a4c8713e1d10286835f390e025f->m_frame.f_lineno = 220; - tmp_assign_source_4 = CALL_FUNCTION_WITH_SINGLE_ARG(tmp_called_name_2, tmp_args_element_name_2); - Py_DECREF(tmp_called_name_2); - if (tmp_assign_source_4 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 220; - type_description_1 = "ooooooo"; - goto frame_exception_exit_1; - } - { - PyObject *old = par_weights; - par_weights = tmp_assign_source_4; - Py_XDECREF(old); - } - - } - { - bool tmp_condition_result_2; - PyObject *tmp_compexpr_left_2; - PyObject *tmp_compexpr_right_2; - PyObject *tmp_expression_name_4; - if (par_self == NULL) { - - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[21]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - exception_lineno = 223; - type_description_1 = "ooooooo"; - goto frame_exception_exit_1; - } - - tmp_expression_name_4 = par_self; - tmp_compexpr_left_2 = LOOKUP_ATTRIBUTE(tmp_expression_name_4, mod_consts[67]); - if (tmp_compexpr_left_2 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 223; - type_description_1 = "ooooooo"; - goto frame_exception_exit_1; - } - tmp_compexpr_right_2 = Py_None; - tmp_condition_result_2 = (tmp_compexpr_left_2 == tmp_compexpr_right_2) ? true : false; - Py_DECREF(tmp_compexpr_left_2); - if (tmp_condition_result_2 != false) { - goto branch_yes_2; - } else { - goto branch_no_2; - } - } - branch_yes_2:; - { - PyObject *tmp_assign_source_5; - PyObject *tmp_called_instance_6; - PyObject *tmp_called_instance_7; - PyObject *tmp_called_name_3; - PyObject *tmp_expression_name_5; - PyObject *tmp_args_element_name_3; - PyObject *tmp_expression_name_6; - PyObject *tmp_called_instance_8; - PyObject *tmp_subscript_name_2; - tmp_expression_name_5 = GET_STRING_DICT_VALUE(moduledict_models$unet3d$losses, (Nuitka_StringObject *)mod_consts[28]); - - if (unlikely(tmp_expression_name_5 == NULL)) { - tmp_expression_name_5 = GET_MODULE_VARIABLE_VALUE_FALLBACK(mod_consts[28]); - } - - if (tmp_expression_name_5 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 224; - type_description_1 = "ooooooo"; - goto frame_exception_exit_1; - } - tmp_called_name_3 = LOOKUP_ATTRIBUTE(tmp_expression_name_5, mod_consts[75]); - if (tmp_called_name_3 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 224; - type_description_1 = "ooooooo"; - goto frame_exception_exit_1; - } - if (par_input == NULL) { - Py_DECREF(tmp_called_name_3); - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[3]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - exception_lineno = 224; - type_description_1 = "ooooooo"; - goto frame_exception_exit_1; - } - - tmp_called_instance_8 = par_input; - frame_ca8b7a4c8713e1d10286835f390e025f->m_frame.f_lineno = 224; - tmp_expression_name_6 = CALL_METHOD_NO_ARGS(tmp_called_instance_8, mod_consts[0]); - if (tmp_expression_name_6 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - Py_DECREF(tmp_called_name_3); - - exception_lineno = 224; - type_description_1 = "ooooooo"; - goto frame_exception_exit_1; - } - tmp_subscript_name_2 = mod_consts[25]; - tmp_args_element_name_3 = LOOKUP_SUBSCRIPT_CONST(tmp_expression_name_6, tmp_subscript_name_2, 1); - Py_DECREF(tmp_expression_name_6); - if (tmp_args_element_name_3 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - Py_DECREF(tmp_called_name_3); - - exception_lineno = 224; - type_description_1 = "ooooooo"; - goto frame_exception_exit_1; - } - frame_ca8b7a4c8713e1d10286835f390e025f->m_frame.f_lineno = 224; - tmp_called_instance_7 = CALL_FUNCTION_WITH_SINGLE_ARG(tmp_called_name_3, tmp_args_element_name_3); - Py_DECREF(tmp_called_name_3); - Py_DECREF(tmp_args_element_name_3); - if (tmp_called_instance_7 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 224; - type_description_1 = "ooooooo"; - goto frame_exception_exit_1; - } - frame_ca8b7a4c8713e1d10286835f390e025f->m_frame.f_lineno = 224; - tmp_called_instance_6 = CALL_METHOD_NO_ARGS(tmp_called_instance_7, mod_consts[5]); - Py_DECREF(tmp_called_instance_7); - if (tmp_called_instance_6 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 224; - type_description_1 = "ooooooo"; - goto frame_exception_exit_1; - } - frame_ca8b7a4c8713e1d10286835f390e025f->m_frame.f_lineno = 224; - tmp_assign_source_5 = CALL_METHOD_NO_ARGS(tmp_called_instance_6, mod_consts[76]); - Py_DECREF(tmp_called_instance_6); - if (tmp_assign_source_5 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 224; - type_description_1 = "ooooooo"; - goto frame_exception_exit_1; - } - assert(var_class_weights == NULL); - var_class_weights = tmp_assign_source_5; - } - goto branch_end_2; - branch_no_2:; - { - PyObject *tmp_assign_source_6; - PyObject *tmp_expression_name_7; - if (par_self == NULL) { - - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[21]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - exception_lineno = 226; - type_description_1 = "ooooooo"; - goto frame_exception_exit_1; - } - - tmp_expression_name_7 = par_self; - tmp_assign_source_6 = LOOKUP_ATTRIBUTE(tmp_expression_name_7, mod_consts[67]); - if (tmp_assign_source_6 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 226; - type_description_1 = "ooooooo"; - goto frame_exception_exit_1; - } - assert(var_class_weights == NULL); - var_class_weights = tmp_assign_source_6; - } - branch_end_2:; - { - PyObject *tmp_assign_source_7; - PyObject *tmp_called_instance_9; - CHECK_OBJECT(var_class_weights); - tmp_called_instance_9 = var_class_weights; - frame_ca8b7a4c8713e1d10286835f390e025f->m_frame.f_lineno = 229; - tmp_assign_source_7 = CALL_METHOD_WITH_ARGS5( - tmp_called_instance_9, - mod_consts[77], - &PyTuple_GET_ITEM(mod_consts[78], 0) - ); - - if (tmp_assign_source_7 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 229; - type_description_1 = "ooooooo"; - goto frame_exception_exit_1; - } - { - PyObject *old = var_class_weights; - var_class_weights = tmp_assign_source_7; - Py_XDECREF(old); - } - - } - { - PyObject *tmp_assign_source_8; - PyObject *tmp_left_name_1; - PyObject *tmp_right_name_1; - CHECK_OBJECT(var_class_weights); - tmp_left_name_1 = var_class_weights; - CHECK_OBJECT(par_weights); - tmp_right_name_1 = par_weights; - tmp_assign_source_8 = BINARY_OPERATION_MULT_OBJECT_OBJECT_OBJECT(tmp_left_name_1, tmp_right_name_1); - if (tmp_assign_source_8 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 232; - type_description_1 = "ooooooo"; - goto frame_exception_exit_1; - } - { - PyObject *old = par_weights; - par_weights = tmp_assign_source_8; - Py_XDECREF(old); - } - - } - { - PyObject *tmp_assign_source_9; - PyObject *tmp_left_name_2; - PyObject *tmp_left_name_3; - PyObject *tmp_operand_name_2; - PyObject *tmp_right_name_2; - PyObject *tmp_right_name_3; - CHECK_OBJECT(par_weights); - tmp_operand_name_2 = par_weights; - tmp_left_name_3 = UNARY_OPERATION(PyNumber_Negative, tmp_operand_name_2); - if (tmp_left_name_3 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 235; - type_description_1 = "ooooooo"; - goto frame_exception_exit_1; - } - CHECK_OBJECT(par_target); - tmp_right_name_2 = par_target; - tmp_left_name_2 = BINARY_OPERATION_MULT_OBJECT_OBJECT_OBJECT(tmp_left_name_3, tmp_right_name_2); - Py_DECREF(tmp_left_name_3); - if (tmp_left_name_2 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 235; - type_description_1 = "ooooooo"; - goto frame_exception_exit_1; - } - CHECK_OBJECT(var_log_probabilities); - tmp_right_name_3 = var_log_probabilities; - tmp_assign_source_9 = BINARY_OPERATION_MULT_OBJECT_OBJECT_OBJECT(tmp_left_name_2, tmp_right_name_3); - Py_DECREF(tmp_left_name_2); - if (tmp_assign_source_9 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 235; - type_description_1 = "ooooooo"; - goto frame_exception_exit_1; - } - assert(var_result == NULL); - var_result = tmp_assign_source_9; - } - { - PyObject *tmp_called_instance_10; - CHECK_OBJECT(var_result); - tmp_called_instance_10 = var_result; - frame_ca8b7a4c8713e1d10286835f390e025f->m_frame.f_lineno = 237; - tmp_return_value = CALL_METHOD_NO_ARGS(tmp_called_instance_10, mod_consts[45]); - if (tmp_return_value == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 237; - type_description_1 = "ooooooo"; - goto frame_exception_exit_1; - } - goto frame_return_exit_1; - } - -#if 0 - RESTORE_FRAME_EXCEPTION(frame_ca8b7a4c8713e1d10286835f390e025f); -#endif - - // Put the previous frame back on top. - popFrameStack(); - - goto frame_no_exception_1; - - frame_return_exit_1:; -#if 0 - RESTORE_FRAME_EXCEPTION(frame_ca8b7a4c8713e1d10286835f390e025f); -#endif - - // Put the previous frame back on top. - popFrameStack(); - - goto try_return_handler_1; - - frame_exception_exit_1:; - -#if 0 - RESTORE_FRAME_EXCEPTION(frame_ca8b7a4c8713e1d10286835f390e025f); -#endif - - if (exception_tb == NULL) { - exception_tb = MAKE_TRACEBACK(frame_ca8b7a4c8713e1d10286835f390e025f, exception_lineno); - } else if (exception_tb->tb_frame != &frame_ca8b7a4c8713e1d10286835f390e025f->m_frame) { - exception_tb = ADD_TRACEBACK(exception_tb, frame_ca8b7a4c8713e1d10286835f390e025f, exception_lineno); - } - - // Attaches locals to frame if any. - Nuitka_Frame_AttachLocals( - frame_ca8b7a4c8713e1d10286835f390e025f, - type_description_1, - par_self, - par_input, - par_target, - par_weights, - var_log_probabilities, - var_class_weights, - var_result - ); - - - // Release cached frame if used for exception. - if (frame_ca8b7a4c8713e1d10286835f390e025f == cache_frame_ca8b7a4c8713e1d10286835f390e025f) { -#if _DEBUG_REFCOUNTS - count_active_frame_cache_instances -= 1; - count_released_frame_cache_instances += 1; -#endif - - Py_DECREF(cache_frame_ca8b7a4c8713e1d10286835f390e025f); - cache_frame_ca8b7a4c8713e1d10286835f390e025f = NULL; - } - - assertFrameObject(frame_ca8b7a4c8713e1d10286835f390e025f); - - // Put the previous frame back on top. - popFrameStack(); - - // Return the error. - goto try_except_handler_1; - - frame_no_exception_1:; - NUITKA_CANNOT_GET_HERE("tried codes exits in all cases"); - return NULL; - // Return handler code: - try_return_handler_1:; - Py_XDECREF(par_self); - par_self = NULL; - Py_XDECREF(par_input); - par_input = NULL; - Py_XDECREF(par_target); - par_target = NULL; - CHECK_OBJECT(par_weights); - Py_DECREF(par_weights); - par_weights = NULL; - Py_XDECREF(var_log_probabilities); - var_log_probabilities = NULL; - Py_XDECREF(var_class_weights); - var_class_weights = NULL; - Py_XDECREF(var_result); - var_result = NULL; - goto function_return_exit; - // Exception handler code: - try_except_handler_1:; - exception_keeper_type_1 = exception_type; - exception_keeper_value_1 = exception_value; - exception_keeper_tb_1 = exception_tb; - exception_keeper_lineno_1 = exception_lineno; - exception_type = NULL; - exception_value = NULL; - exception_tb = NULL; - exception_lineno = 0; - - Py_XDECREF(par_self); - par_self = NULL; - Py_XDECREF(par_input); - par_input = NULL; - Py_XDECREF(par_target); - par_target = NULL; - Py_XDECREF(par_weights); - par_weights = NULL; - Py_XDECREF(var_log_probabilities); - var_log_probabilities = NULL; - Py_XDECREF(var_class_weights); - var_class_weights = NULL; - Py_XDECREF(var_result); - var_result = NULL; - // Re-raise. - exception_type = exception_keeper_type_1; - exception_value = exception_keeper_value_1; - exception_tb = exception_keeper_tb_1; - exception_lineno = exception_keeper_lineno_1; - - goto function_exception_exit; - // End of try: - - NUITKA_CANNOT_GET_HERE("Return statement must have exited already."); - return NULL; - -function_exception_exit: - assert(exception_type); - RESTORE_ERROR_OCCURRED(exception_type, exception_value, exception_tb); - - return NULL; - -function_return_exit: - // Function cleanup code if any. - - - // Actual function exit with return value, making sure we did not make - // the error status worse despite non-NULL return. - CHECK_OBJECT(tmp_return_value); - assert(had_error || !ERROR_OCCURRED()); - return tmp_return_value; -} - - -static PyObject *impl_models$unet3d$losses$$$function__20___init__(struct Nuitka_FunctionObject const *self, PyObject **python_pars) { - // Preserve error status for checks -#ifndef __NUITKA_NO_ASSERT__ - NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED(); -#endif - - // Local variable declarations. - PyObject *par_self = python_pars[0]; - PyObject *par_threshold = python_pars[1]; - PyObject *par_initial_weight = python_pars[2]; - PyObject *par_apply_below_threshold = python_pars[3]; - struct Nuitka_FrameObject *frame_915a2da7d900624b990aa096cbb70b79; - NUITKA_MAY_BE_UNUSED char const *type_description_1 = NULL; - NUITKA_MAY_BE_UNUSED nuitka_void tmp_unused; - PyObject *exception_type = NULL; - PyObject *exception_value = NULL; - PyTracebackObject *exception_tb = NULL; - NUITKA_MAY_BE_UNUSED int exception_lineno = 0; - bool tmp_result; - static struct Nuitka_FrameObject *cache_frame_915a2da7d900624b990aa096cbb70b79 = NULL; - PyObject *tmp_return_value = NULL; - PyObject *exception_keeper_type_1; - PyObject *exception_keeper_value_1; - PyTracebackObject *exception_keeper_tb_1; - NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_1; - - // Actual function body. - // Tried code: - if (isFrameUnusable(cache_frame_915a2da7d900624b990aa096cbb70b79)) { - Py_XDECREF(cache_frame_915a2da7d900624b990aa096cbb70b79); - -#if _DEBUG_REFCOUNTS - if (cache_frame_915a2da7d900624b990aa096cbb70b79 == NULL) { - count_active_frame_cache_instances += 1; - } else { - count_released_frame_cache_instances += 1; - } - count_allocated_frame_cache_instances += 1; -#endif - cache_frame_915a2da7d900624b990aa096cbb70b79 = MAKE_FUNCTION_FRAME(codeobj_915a2da7d900624b990aa096cbb70b79, module_models$unet3d$losses, sizeof(void *)+sizeof(void *)+sizeof(void *)+sizeof(void *)+sizeof(void *)); -#if _DEBUG_REFCOUNTS - } else { - count_hit_frame_cache_instances += 1; -#endif - } - assert(cache_frame_915a2da7d900624b990aa096cbb70b79->m_type_description == NULL); - frame_915a2da7d900624b990aa096cbb70b79 = cache_frame_915a2da7d900624b990aa096cbb70b79; - - // Push the new frame as the currently active one. - pushFrameStack(frame_915a2da7d900624b990aa096cbb70b79); - - // Mark the frame object as in use, ref count 1 will be up for reuse. - assert(Py_REFCNT(frame_915a2da7d900624b990aa096cbb70b79) == 2); // Frame stack - - // Framed code: - { - PyObject *tmp_called_name_1; - PyObject *tmp_expression_name_1; - PyObject *tmp_type_arg_name_1; - PyObject *tmp_object_arg_name_1; - PyObject *tmp_call_result_1; - PyObject *tmp_kwargs_name_1; - if (Nuitka_Cell_GET(self->m_closure[0]) == NULL) { - - FORMAT_UNBOUND_CLOSURE_ERROR(&exception_type, &exception_value, mod_consts[46]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - exception_lineno = 242; - type_description_1 = "ooooc"; - goto frame_exception_exit_1; - } - - tmp_type_arg_name_1 = Nuitka_Cell_GET(self->m_closure[0]); - CHECK_OBJECT(par_self); - tmp_object_arg_name_1 = par_self; - tmp_expression_name_1 = BUILTIN_SUPER0(tmp_type_arg_name_1, tmp_object_arg_name_1); - if (tmp_expression_name_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 242; - type_description_1 = "ooooc"; - goto frame_exception_exit_1; - } - tmp_called_name_1 = LOOKUP_ATTRIBUTE(tmp_expression_name_1, mod_consts[13]); - Py_DECREF(tmp_expression_name_1); - if (tmp_called_name_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 242; - type_description_1 = "ooooc"; - goto frame_exception_exit_1; - } - tmp_kwargs_name_1 = PyDict_Copy(mod_consts[79]); - frame_915a2da7d900624b990aa096cbb70b79->m_frame.f_lineno = 242; - tmp_call_result_1 = CALL_FUNCTION_WITH_KEYARGS(tmp_called_name_1, tmp_kwargs_name_1); - Py_DECREF(tmp_called_name_1); - Py_DECREF(tmp_kwargs_name_1); - if (tmp_call_result_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 242; - type_description_1 = "ooooc"; - goto frame_exception_exit_1; - } - Py_DECREF(tmp_call_result_1); - } - { - PyObject *tmp_assattr_name_1; - PyObject *tmp_assattr_target_1; - CHECK_OBJECT(par_threshold); - tmp_assattr_name_1 = par_threshold; - CHECK_OBJECT(par_self); - tmp_assattr_target_1 = par_self; - tmp_result = SET_ATTRIBUTE(tmp_assattr_target_1, mod_consts[80], tmp_assattr_name_1); - if (tmp_result == false) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 243; - type_description_1 = "ooooc"; - goto frame_exception_exit_1; - } - } - { - PyObject *tmp_assattr_name_2; - PyObject *tmp_assattr_target_2; - CHECK_OBJECT(par_apply_below_threshold); - tmp_assattr_name_2 = par_apply_below_threshold; - CHECK_OBJECT(par_self); - tmp_assattr_target_2 = par_self; - tmp_result = SET_ATTRIBUTE(tmp_assattr_target_2, mod_consts[81], tmp_assattr_name_2); - if (tmp_result == false) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 244; - type_description_1 = "ooooc"; - goto frame_exception_exit_1; - } - } - { - PyObject *tmp_assattr_name_3; - PyObject *tmp_assattr_target_3; - CHECK_OBJECT(par_initial_weight); - tmp_assattr_name_3 = par_initial_weight; - CHECK_OBJECT(par_self); - tmp_assattr_target_3 = par_self; - tmp_result = SET_ATTRIBUTE(tmp_assattr_target_3, mod_consts[33], tmp_assattr_name_3); - if (tmp_result == false) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 245; - type_description_1 = "ooooc"; - goto frame_exception_exit_1; - } - } - -#if 0 - RESTORE_FRAME_EXCEPTION(frame_915a2da7d900624b990aa096cbb70b79); -#endif - - // Put the previous frame back on top. - popFrameStack(); - - goto frame_no_exception_1; - - frame_exception_exit_1:; - -#if 0 - RESTORE_FRAME_EXCEPTION(frame_915a2da7d900624b990aa096cbb70b79); -#endif - - if (exception_tb == NULL) { - exception_tb = MAKE_TRACEBACK(frame_915a2da7d900624b990aa096cbb70b79, exception_lineno); - } else if (exception_tb->tb_frame != &frame_915a2da7d900624b990aa096cbb70b79->m_frame) { - exception_tb = ADD_TRACEBACK(exception_tb, frame_915a2da7d900624b990aa096cbb70b79, exception_lineno); - } - - // Attaches locals to frame if any. - Nuitka_Frame_AttachLocals( - frame_915a2da7d900624b990aa096cbb70b79, - type_description_1, - par_self, - par_threshold, - par_initial_weight, - par_apply_below_threshold, - self->m_closure[0] - ); - - - // Release cached frame if used for exception. - if (frame_915a2da7d900624b990aa096cbb70b79 == cache_frame_915a2da7d900624b990aa096cbb70b79) { -#if _DEBUG_REFCOUNTS - count_active_frame_cache_instances -= 1; - count_released_frame_cache_instances += 1; -#endif - - Py_DECREF(cache_frame_915a2da7d900624b990aa096cbb70b79); - cache_frame_915a2da7d900624b990aa096cbb70b79 = NULL; - } - - assertFrameObject(frame_915a2da7d900624b990aa096cbb70b79); - - // Put the previous frame back on top. - popFrameStack(); - - // Return the error. - goto try_except_handler_1; - - frame_no_exception_1:; - tmp_return_value = Py_None; - Py_INCREF(tmp_return_value); - goto try_return_handler_1; - NUITKA_CANNOT_GET_HERE("tried codes exits in all cases"); - return NULL; - // Return handler code: - try_return_handler_1:; - CHECK_OBJECT(par_self); - Py_DECREF(par_self); - par_self = NULL; - CHECK_OBJECT(par_threshold); - Py_DECREF(par_threshold); - par_threshold = NULL; - CHECK_OBJECT(par_initial_weight); - Py_DECREF(par_initial_weight); - par_initial_weight = NULL; - CHECK_OBJECT(par_apply_below_threshold); - Py_DECREF(par_apply_below_threshold); - par_apply_below_threshold = NULL; - goto function_return_exit; - // Exception handler code: - try_except_handler_1:; - exception_keeper_type_1 = exception_type; - exception_keeper_value_1 = exception_value; - exception_keeper_tb_1 = exception_tb; - exception_keeper_lineno_1 = exception_lineno; - exception_type = NULL; - exception_value = NULL; - exception_tb = NULL; - exception_lineno = 0; - - CHECK_OBJECT(par_self); - Py_DECREF(par_self); - par_self = NULL; - CHECK_OBJECT(par_threshold); - Py_DECREF(par_threshold); - par_threshold = NULL; - CHECK_OBJECT(par_initial_weight); - Py_DECREF(par_initial_weight); - par_initial_weight = NULL; - CHECK_OBJECT(par_apply_below_threshold); - Py_DECREF(par_apply_below_threshold); - par_apply_below_threshold = NULL; - // Re-raise. - exception_type = exception_keeper_type_1; - exception_value = exception_keeper_value_1; - exception_tb = exception_keeper_tb_1; - exception_lineno = exception_keeper_lineno_1; - - goto function_exception_exit; - // End of try: - - NUITKA_CANNOT_GET_HERE("Return statement must have exited already."); - return NULL; - -function_exception_exit: - assert(exception_type); - RESTORE_ERROR_OCCURRED(exception_type, exception_value, exception_tb); - - return NULL; - -function_return_exit: - // Function cleanup code if any. - - - // Actual function exit with return value, making sure we did not make - // the error status worse despite non-NULL return. - CHECK_OBJECT(tmp_return_value); - assert(had_error || !ERROR_OCCURRED()); - return tmp_return_value; -} - - -static PyObject *impl_models$unet3d$losses$$$function__21_forward(struct Nuitka_FunctionObject const *self, PyObject **python_pars) { - // Preserve error status for checks -#ifndef __NUITKA_NO_ASSERT__ - NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED(); -#endif - - // Local variable declarations. - PyObject *par_self = python_pars[0]; - PyObject *par_input = python_pars[1]; - PyObject *par_target = python_pars[2]; - PyObject *var_l1 = NULL; - PyObject *var_mask = NULL; - struct Nuitka_FrameObject *frame_ce55a77527b8cae9d98b409844d8d681; - NUITKA_MAY_BE_UNUSED char const *type_description_1 = NULL; - PyObject *exception_type = NULL; - PyObject *exception_value = NULL; - PyTracebackObject *exception_tb = NULL; - NUITKA_MAY_BE_UNUSED int exception_lineno = 0; - bool tmp_result; - PyObject *tmp_return_value = NULL; - static struct Nuitka_FrameObject *cache_frame_ce55a77527b8cae9d98b409844d8d681 = NULL; - PyObject *exception_keeper_type_1; - PyObject *exception_keeper_value_1; - PyTracebackObject *exception_keeper_tb_1; - NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_1; - - // Actual function body. - // Tried code: - if (isFrameUnusable(cache_frame_ce55a77527b8cae9d98b409844d8d681)) { - Py_XDECREF(cache_frame_ce55a77527b8cae9d98b409844d8d681); - -#if _DEBUG_REFCOUNTS - if (cache_frame_ce55a77527b8cae9d98b409844d8d681 == NULL) { - count_active_frame_cache_instances += 1; - } else { - count_released_frame_cache_instances += 1; - } - count_allocated_frame_cache_instances += 1; -#endif - cache_frame_ce55a77527b8cae9d98b409844d8d681 = MAKE_FUNCTION_FRAME(codeobj_ce55a77527b8cae9d98b409844d8d681, module_models$unet3d$losses, sizeof(void *)+sizeof(void *)+sizeof(void *)+sizeof(void *)+sizeof(void *)+sizeof(void *)); -#if _DEBUG_REFCOUNTS - } else { - count_hit_frame_cache_instances += 1; -#endif - } - assert(cache_frame_ce55a77527b8cae9d98b409844d8d681->m_type_description == NULL); - frame_ce55a77527b8cae9d98b409844d8d681 = cache_frame_ce55a77527b8cae9d98b409844d8d681; - - // Push the new frame as the currently active one. - pushFrameStack(frame_ce55a77527b8cae9d98b409844d8d681); - - // Mark the frame object as in use, ref count 1 will be up for reuse. - assert(Py_REFCNT(frame_ce55a77527b8cae9d98b409844d8d681) == 2); // Frame stack - - // Framed code: - { - PyObject *tmp_assign_source_1; - PyObject *tmp_called_instance_1; - PyObject *tmp_type_arg_name_1; - PyObject *tmp_object_arg_name_1; - PyObject *tmp_args_element_name_1; - PyObject *tmp_args_element_name_2; - if (Nuitka_Cell_GET(self->m_closure[0]) == NULL) { - - FORMAT_UNBOUND_CLOSURE_ERROR(&exception_type, &exception_value, mod_consts[46]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - exception_lineno = 248; - type_description_1 = "oooooc"; - goto frame_exception_exit_1; - } - - tmp_type_arg_name_1 = Nuitka_Cell_GET(self->m_closure[0]); - CHECK_OBJECT(par_self); - tmp_object_arg_name_1 = par_self; - tmp_called_instance_1 = BUILTIN_SUPER0(tmp_type_arg_name_1, tmp_object_arg_name_1); - if (tmp_called_instance_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 248; - type_description_1 = "oooooc"; - goto frame_exception_exit_1; - } - CHECK_OBJECT(par_input); - tmp_args_element_name_1 = par_input; - CHECK_OBJECT(par_target); - tmp_args_element_name_2 = par_target; - frame_ce55a77527b8cae9d98b409844d8d681->m_frame.f_lineno = 248; - { - PyObject *call_args[] = {tmp_args_element_name_1, tmp_args_element_name_2}; - tmp_assign_source_1 = CALL_METHOD_WITH_ARGS2( - tmp_called_instance_1, - mod_consts[82], - call_args - ); - } - - Py_DECREF(tmp_called_instance_1); - if (tmp_assign_source_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 248; - type_description_1 = "oooooc"; - goto frame_exception_exit_1; - } - assert(var_l1 == NULL); - var_l1 = tmp_assign_source_1; - } - { - nuitka_bool tmp_condition_result_1; - PyObject *tmp_expression_name_1; - PyObject *tmp_attribute_value_1; - int tmp_truth_name_1; - CHECK_OBJECT(par_self); - tmp_expression_name_1 = par_self; - tmp_attribute_value_1 = LOOKUP_ATTRIBUTE(tmp_expression_name_1, mod_consts[81]); - if (tmp_attribute_value_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 250; - type_description_1 = "oooooc"; - goto frame_exception_exit_1; - } - tmp_truth_name_1 = CHECK_IF_TRUE(tmp_attribute_value_1); - if (tmp_truth_name_1 == -1) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - Py_DECREF(tmp_attribute_value_1); - - exception_lineno = 250; - type_description_1 = "oooooc"; - goto frame_exception_exit_1; - } - tmp_condition_result_1 = tmp_truth_name_1 == 0 ? NUITKA_BOOL_FALSE : NUITKA_BOOL_TRUE; - Py_DECREF(tmp_attribute_value_1); - if (tmp_condition_result_1 == NUITKA_BOOL_TRUE) { - goto branch_yes_1; - } else { - goto branch_no_1; - } - } - branch_yes_1:; - { - PyObject *tmp_assign_source_2; - PyObject *tmp_compexpr_left_1; - PyObject *tmp_compexpr_right_1; - PyObject *tmp_expression_name_2; - if (par_target == NULL) { - - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[4]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - exception_lineno = 251; - type_description_1 = "oooooc"; - goto frame_exception_exit_1; - } - - tmp_compexpr_left_1 = par_target; - if (par_self == NULL) { - - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[21]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - exception_lineno = 251; - type_description_1 = "oooooc"; - goto frame_exception_exit_1; - } - - tmp_expression_name_2 = par_self; - tmp_compexpr_right_1 = LOOKUP_ATTRIBUTE(tmp_expression_name_2, mod_consts[80]); - if (tmp_compexpr_right_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 251; - type_description_1 = "oooooc"; - goto frame_exception_exit_1; - } - tmp_assign_source_2 = RICH_COMPARE_LT_OBJECT_OBJECT_OBJECT(tmp_compexpr_left_1, tmp_compexpr_right_1); - Py_DECREF(tmp_compexpr_right_1); - if (tmp_assign_source_2 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 251; - type_description_1 = "oooooc"; - goto frame_exception_exit_1; - } - assert(var_mask == NULL); - var_mask = tmp_assign_source_2; - } - goto branch_end_1; - branch_no_1:; - { - PyObject *tmp_assign_source_3; - PyObject *tmp_compexpr_left_2; - PyObject *tmp_compexpr_right_2; - PyObject *tmp_expression_name_3; - if (par_target == NULL) { - - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[4]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - exception_lineno = 253; - type_description_1 = "oooooc"; - goto frame_exception_exit_1; - } - - tmp_compexpr_left_2 = par_target; - if (par_self == NULL) { - - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[21]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - exception_lineno = 253; - type_description_1 = "oooooc"; - goto frame_exception_exit_1; - } - - tmp_expression_name_3 = par_self; - tmp_compexpr_right_2 = LOOKUP_ATTRIBUTE(tmp_expression_name_3, mod_consts[80]); - if (tmp_compexpr_right_2 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 253; - type_description_1 = "oooooc"; - goto frame_exception_exit_1; - } - tmp_assign_source_3 = RICH_COMPARE_GE_OBJECT_OBJECT_OBJECT(tmp_compexpr_left_2, tmp_compexpr_right_2); - Py_DECREF(tmp_compexpr_right_2); - if (tmp_assign_source_3 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 253; - type_description_1 = "oooooc"; - goto frame_exception_exit_1; - } - assert(var_mask == NULL); - var_mask = tmp_assign_source_3; - } - branch_end_1:; - { - PyObject *tmp_ass_subvalue_1; - PyObject *tmp_left_name_1; - PyObject *tmp_expression_name_4; - PyObject *tmp_subscript_name_1; - PyObject *tmp_right_name_1; - PyObject *tmp_expression_name_5; - PyObject *tmp_ass_subscribed_1; - PyObject *tmp_ass_subscript_1; - CHECK_OBJECT(var_l1); - tmp_expression_name_4 = var_l1; - CHECK_OBJECT(var_mask); - tmp_subscript_name_1 = var_mask; - tmp_left_name_1 = LOOKUP_SUBSCRIPT(tmp_expression_name_4, tmp_subscript_name_1); - if (tmp_left_name_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 255; - type_description_1 = "oooooc"; - goto frame_exception_exit_1; - } - if (par_self == NULL) { - Py_DECREF(tmp_left_name_1); - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[21]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - exception_lineno = 255; - type_description_1 = "oooooc"; - goto frame_exception_exit_1; - } - - tmp_expression_name_5 = par_self; - tmp_right_name_1 = LOOKUP_ATTRIBUTE(tmp_expression_name_5, mod_consts[33]); - if (tmp_right_name_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - Py_DECREF(tmp_left_name_1); - - exception_lineno = 255; - type_description_1 = "oooooc"; - goto frame_exception_exit_1; - } - tmp_ass_subvalue_1 = BINARY_OPERATION_MULT_OBJECT_OBJECT_OBJECT(tmp_left_name_1, tmp_right_name_1); - Py_DECREF(tmp_left_name_1); - Py_DECREF(tmp_right_name_1); - if (tmp_ass_subvalue_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 255; - type_description_1 = "oooooc"; - goto frame_exception_exit_1; - } - CHECK_OBJECT(var_l1); - tmp_ass_subscribed_1 = var_l1; - CHECK_OBJECT(var_mask); - tmp_ass_subscript_1 = var_mask; - tmp_result = SET_SUBSCRIPT(tmp_ass_subscribed_1, tmp_ass_subscript_1, tmp_ass_subvalue_1); - Py_DECREF(tmp_ass_subvalue_1); - if (tmp_result == false) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 255; - type_description_1 = "oooooc"; - goto frame_exception_exit_1; - } - } - { - PyObject *tmp_called_instance_2; - if (var_l1 == NULL) { - - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[83]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - exception_lineno = 257; - type_description_1 = "oooooc"; - goto frame_exception_exit_1; - } - - tmp_called_instance_2 = var_l1; - frame_ce55a77527b8cae9d98b409844d8d681->m_frame.f_lineno = 257; - tmp_return_value = CALL_METHOD_NO_ARGS(tmp_called_instance_2, mod_consts[45]); - if (tmp_return_value == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 257; - type_description_1 = "oooooc"; - goto frame_exception_exit_1; - } - goto frame_return_exit_1; - } - -#if 0 - RESTORE_FRAME_EXCEPTION(frame_ce55a77527b8cae9d98b409844d8d681); -#endif - - // Put the previous frame back on top. - popFrameStack(); - - goto frame_no_exception_1; - - frame_return_exit_1:; -#if 0 - RESTORE_FRAME_EXCEPTION(frame_ce55a77527b8cae9d98b409844d8d681); -#endif - - // Put the previous frame back on top. - popFrameStack(); - - goto try_return_handler_1; - - frame_exception_exit_1:; - -#if 0 - RESTORE_FRAME_EXCEPTION(frame_ce55a77527b8cae9d98b409844d8d681); -#endif - - if (exception_tb == NULL) { - exception_tb = MAKE_TRACEBACK(frame_ce55a77527b8cae9d98b409844d8d681, exception_lineno); - } else if (exception_tb->tb_frame != &frame_ce55a77527b8cae9d98b409844d8d681->m_frame) { - exception_tb = ADD_TRACEBACK(exception_tb, frame_ce55a77527b8cae9d98b409844d8d681, exception_lineno); - } - - // Attaches locals to frame if any. - Nuitka_Frame_AttachLocals( - frame_ce55a77527b8cae9d98b409844d8d681, - type_description_1, - par_self, - par_input, - par_target, - var_l1, - var_mask, - self->m_closure[0] - ); - - - // Release cached frame if used for exception. - if (frame_ce55a77527b8cae9d98b409844d8d681 == cache_frame_ce55a77527b8cae9d98b409844d8d681) { -#if _DEBUG_REFCOUNTS - count_active_frame_cache_instances -= 1; - count_released_frame_cache_instances += 1; -#endif - - Py_DECREF(cache_frame_ce55a77527b8cae9d98b409844d8d681); - cache_frame_ce55a77527b8cae9d98b409844d8d681 = NULL; - } - - assertFrameObject(frame_ce55a77527b8cae9d98b409844d8d681); - - // Put the previous frame back on top. - popFrameStack(); - - // Return the error. - goto try_except_handler_1; - - frame_no_exception_1:; - NUITKA_CANNOT_GET_HERE("tried codes exits in all cases"); - return NULL; - // Return handler code: - try_return_handler_1:; - Py_XDECREF(par_self); - par_self = NULL; - Py_XDECREF(par_input); - par_input = NULL; - Py_XDECREF(par_target); - par_target = NULL; - Py_XDECREF(var_l1); - var_l1 = NULL; - CHECK_OBJECT(var_mask); - Py_DECREF(var_mask); - var_mask = NULL; - goto function_return_exit; - // Exception handler code: - try_except_handler_1:; - exception_keeper_type_1 = exception_type; - exception_keeper_value_1 = exception_value; - exception_keeper_tb_1 = exception_tb; - exception_keeper_lineno_1 = exception_lineno; - exception_type = NULL; - exception_value = NULL; - exception_tb = NULL; - exception_lineno = 0; - - Py_XDECREF(par_self); - par_self = NULL; - Py_XDECREF(par_input); - par_input = NULL; - Py_XDECREF(par_target); - par_target = NULL; - Py_XDECREF(var_l1); - var_l1 = NULL; - Py_XDECREF(var_mask); - var_mask = NULL; - // Re-raise. - exception_type = exception_keeper_type_1; - exception_value = exception_keeper_value_1; - exception_tb = exception_keeper_tb_1; - exception_lineno = exception_keeper_lineno_1; - - goto function_exception_exit; - // End of try: - - NUITKA_CANNOT_GET_HERE("Return statement must have exited already."); - return NULL; - -function_exception_exit: - assert(exception_type); - RESTORE_ERROR_OCCURRED(exception_type, exception_value, exception_tb); - - return NULL; - -function_return_exit: - // Function cleanup code if any. - - - // Actual function exit with return value, making sure we did not make - // the error status worse despite non-NULL return. - CHECK_OBJECT(tmp_return_value); - assert(had_error || !ERROR_OCCURRED()); - return tmp_return_value; -} - - -static PyObject *impl_models$unet3d$losses$$$function__22_flatten(struct Nuitka_FunctionObject const *self, PyObject **python_pars) { - // Preserve error status for checks -#ifndef __NUITKA_NO_ASSERT__ - NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED(); -#endif - - // Local variable declarations. - PyObject *par_tensor = python_pars[0]; - PyObject *var_C = NULL; - PyObject *var_axis_order = NULL; - PyObject *var_transposed = NULL; - struct Nuitka_FrameObject *frame_0201c31e1e7feff6304044e6d3951db4; - NUITKA_MAY_BE_UNUSED char const *type_description_1 = NULL; - PyObject *exception_type = NULL; - PyObject *exception_value = NULL; - PyTracebackObject *exception_tb = NULL; - NUITKA_MAY_BE_UNUSED int exception_lineno = 0; - PyObject *tmp_return_value = NULL; - static struct Nuitka_FrameObject *cache_frame_0201c31e1e7feff6304044e6d3951db4 = NULL; - PyObject *exception_keeper_type_1; - PyObject *exception_keeper_value_1; - PyTracebackObject *exception_keeper_tb_1; - NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_1; - - // Actual function body. - // Tried code: - if (isFrameUnusable(cache_frame_0201c31e1e7feff6304044e6d3951db4)) { - Py_XDECREF(cache_frame_0201c31e1e7feff6304044e6d3951db4); - -#if _DEBUG_REFCOUNTS - if (cache_frame_0201c31e1e7feff6304044e6d3951db4 == NULL) { - count_active_frame_cache_instances += 1; - } else { - count_released_frame_cache_instances += 1; - } - count_allocated_frame_cache_instances += 1; -#endif - cache_frame_0201c31e1e7feff6304044e6d3951db4 = MAKE_FUNCTION_FRAME(codeobj_0201c31e1e7feff6304044e6d3951db4, module_models$unet3d$losses, sizeof(void *)+sizeof(void *)+sizeof(void *)+sizeof(void *)); -#if _DEBUG_REFCOUNTS - } else { - count_hit_frame_cache_instances += 1; -#endif - } - assert(cache_frame_0201c31e1e7feff6304044e6d3951db4->m_type_description == NULL); - frame_0201c31e1e7feff6304044e6d3951db4 = cache_frame_0201c31e1e7feff6304044e6d3951db4; - - // Push the new frame as the currently active one. - pushFrameStack(frame_0201c31e1e7feff6304044e6d3951db4); - - // Mark the frame object as in use, ref count 1 will be up for reuse. - assert(Py_REFCNT(frame_0201c31e1e7feff6304044e6d3951db4) == 2); // Frame stack - - // Framed code: - { - PyObject *tmp_assign_source_1; - PyObject *tmp_called_instance_1; - CHECK_OBJECT(par_tensor); - tmp_called_instance_1 = par_tensor; - frame_0201c31e1e7feff6304044e6d3951db4->m_frame.f_lineno = 266; - tmp_assign_source_1 = CALL_METHOD_WITH_ARGS1( - tmp_called_instance_1, - mod_consts[0], - &PyTuple_GET_ITEM(mod_consts[24], 0) - ); - - if (tmp_assign_source_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 266; - type_description_1 = "oooo"; - goto frame_exception_exit_1; - } - assert(var_C == NULL); - var_C = tmp_assign_source_1; - } - { - PyObject *tmp_assign_source_2; - PyObject *tmp_left_name_1; - PyObject *tmp_right_name_1; - PyObject *tmp_tuple_arg_1; - PyObject *tmp_xrange_low_1; - PyObject *tmp_xrange_high_1; - PyObject *tmp_called_instance_2; - tmp_left_name_1 = mod_consts[84]; - tmp_xrange_low_1 = mod_consts[8]; - if (par_tensor == NULL) { - - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[85]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - exception_lineno = 268; - type_description_1 = "oooo"; - goto frame_exception_exit_1; - } - - tmp_called_instance_2 = par_tensor; - frame_0201c31e1e7feff6304044e6d3951db4->m_frame.f_lineno = 268; - tmp_xrange_high_1 = CALL_METHOD_NO_ARGS(tmp_called_instance_2, mod_consts[86]); - if (tmp_xrange_high_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 268; - type_description_1 = "oooo"; - goto frame_exception_exit_1; - } - tmp_tuple_arg_1 = BUILTIN_XRANGE2(tmp_xrange_low_1, tmp_xrange_high_1); - Py_DECREF(tmp_xrange_high_1); - if (tmp_tuple_arg_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 268; - type_description_1 = "oooo"; - goto frame_exception_exit_1; - } - tmp_right_name_1 = PySequence_Tuple(tmp_tuple_arg_1); - Py_DECREF(tmp_tuple_arg_1); - if (tmp_right_name_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 268; - type_description_1 = "oooo"; - goto frame_exception_exit_1; - } - tmp_assign_source_2 = BINARY_OPERATION_ADD_OBJECT_TUPLE_TUPLE(tmp_left_name_1, tmp_right_name_1); - Py_DECREF(tmp_right_name_1); - assert(!(tmp_assign_source_2 == NULL)); - assert(var_axis_order == NULL); - var_axis_order = tmp_assign_source_2; - } - { - PyObject *tmp_assign_source_3; - PyObject *tmp_called_instance_3; - PyObject *tmp_args_element_name_1; - if (par_tensor == NULL) { - - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[85]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - exception_lineno = 270; - type_description_1 = "oooo"; - goto frame_exception_exit_1; - } - - tmp_called_instance_3 = par_tensor; - CHECK_OBJECT(var_axis_order); - tmp_args_element_name_1 = var_axis_order; - frame_0201c31e1e7feff6304044e6d3951db4->m_frame.f_lineno = 270; - tmp_assign_source_3 = CALL_METHOD_WITH_SINGLE_ARG(tmp_called_instance_3, mod_consts[87], tmp_args_element_name_1); - if (tmp_assign_source_3 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 270; - type_description_1 = "oooo"; - goto frame_exception_exit_1; - } - assert(var_transposed == NULL); - var_transposed = tmp_assign_source_3; - } - { - PyObject *tmp_called_instance_4; - PyObject *tmp_called_instance_5; - PyObject *tmp_args_element_name_2; - PyObject *tmp_args_element_name_3; - CHECK_OBJECT(var_transposed); - tmp_called_instance_5 = var_transposed; - frame_0201c31e1e7feff6304044e6d3951db4->m_frame.f_lineno = 272; - tmp_called_instance_4 = CALL_METHOD_NO_ARGS(tmp_called_instance_5, mod_consts[88]); - if (tmp_called_instance_4 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 272; - type_description_1 = "oooo"; - goto frame_exception_exit_1; - } - CHECK_OBJECT(var_C); - tmp_args_element_name_2 = var_C; - tmp_args_element_name_3 = mod_consts[89]; - frame_0201c31e1e7feff6304044e6d3951db4->m_frame.f_lineno = 272; - { - PyObject *call_args[] = {tmp_args_element_name_2, tmp_args_element_name_3}; - tmp_return_value = CALL_METHOD_WITH_ARGS2( - tmp_called_instance_4, - mod_consts[77], - call_args - ); - } - - Py_DECREF(tmp_called_instance_4); - if (tmp_return_value == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 272; - type_description_1 = "oooo"; - goto frame_exception_exit_1; - } - goto frame_return_exit_1; - } - -#if 0 - RESTORE_FRAME_EXCEPTION(frame_0201c31e1e7feff6304044e6d3951db4); -#endif - - // Put the previous frame back on top. - popFrameStack(); - - goto frame_no_exception_1; - - frame_return_exit_1:; -#if 0 - RESTORE_FRAME_EXCEPTION(frame_0201c31e1e7feff6304044e6d3951db4); -#endif - - // Put the previous frame back on top. - popFrameStack(); - - goto try_return_handler_1; - - frame_exception_exit_1:; - -#if 0 - RESTORE_FRAME_EXCEPTION(frame_0201c31e1e7feff6304044e6d3951db4); -#endif - - if (exception_tb == NULL) { - exception_tb = MAKE_TRACEBACK(frame_0201c31e1e7feff6304044e6d3951db4, exception_lineno); - } else if (exception_tb->tb_frame != &frame_0201c31e1e7feff6304044e6d3951db4->m_frame) { - exception_tb = ADD_TRACEBACK(exception_tb, frame_0201c31e1e7feff6304044e6d3951db4, exception_lineno); - } - - // Attaches locals to frame if any. - Nuitka_Frame_AttachLocals( - frame_0201c31e1e7feff6304044e6d3951db4, - type_description_1, - par_tensor, - var_C, - var_axis_order, - var_transposed - ); - - - // Release cached frame if used for exception. - if (frame_0201c31e1e7feff6304044e6d3951db4 == cache_frame_0201c31e1e7feff6304044e6d3951db4) { -#if _DEBUG_REFCOUNTS - count_active_frame_cache_instances -= 1; - count_released_frame_cache_instances += 1; -#endif - - Py_DECREF(cache_frame_0201c31e1e7feff6304044e6d3951db4); - cache_frame_0201c31e1e7feff6304044e6d3951db4 = NULL; - } - - assertFrameObject(frame_0201c31e1e7feff6304044e6d3951db4); - - // Put the previous frame back on top. - popFrameStack(); - - // Return the error. - goto try_except_handler_1; - - frame_no_exception_1:; - NUITKA_CANNOT_GET_HERE("tried codes exits in all cases"); - return NULL; - // Return handler code: - try_return_handler_1:; - Py_XDECREF(par_tensor); - par_tensor = NULL; - Py_XDECREF(var_C); - var_C = NULL; - Py_XDECREF(var_axis_order); - var_axis_order = NULL; - Py_XDECREF(var_transposed); - var_transposed = NULL; - goto function_return_exit; - // Exception handler code: - try_except_handler_1:; - exception_keeper_type_1 = exception_type; - exception_keeper_value_1 = exception_value; - exception_keeper_tb_1 = exception_tb; - exception_keeper_lineno_1 = exception_lineno; - exception_type = NULL; - exception_value = NULL; - exception_tb = NULL; - exception_lineno = 0; - - Py_XDECREF(par_tensor); - par_tensor = NULL; - Py_XDECREF(var_C); - var_C = NULL; - Py_XDECREF(var_axis_order); - var_axis_order = NULL; - Py_XDECREF(var_transposed); - var_transposed = NULL; - // Re-raise. - exception_type = exception_keeper_type_1; - exception_value = exception_keeper_value_1; - exception_tb = exception_keeper_tb_1; - exception_lineno = exception_keeper_lineno_1; - - goto function_exception_exit; - // End of try: - - NUITKA_CANNOT_GET_HERE("Return statement must have exited already."); - return NULL; - -function_exception_exit: - assert(exception_type); - RESTORE_ERROR_OCCURRED(exception_type, exception_value, exception_tb); - - return NULL; - -function_return_exit: - // Function cleanup code if any. - - - // Actual function exit with return value, making sure we did not make - // the error status worse despite non-NULL return. - CHECK_OBJECT(tmp_return_value); - assert(had_error || !ERROR_OCCURRED()); - return tmp_return_value; -} - - -static PyObject *impl_models$unet3d$losses$$$function__23_get_loss_criterion(struct Nuitka_FunctionObject const *self, PyObject **python_pars) { - // Preserve error status for checks -#ifndef __NUITKA_NO_ASSERT__ - NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED(); -#endif - - // Local variable declarations. - PyObject *par_config = python_pars[0]; - PyObject *var_loss_config = NULL; - PyObject *var_name = NULL; - PyObject *var_ignore_index = NULL; - PyObject *var_skip_last_target = NULL; - PyObject *var_weight = NULL; - PyObject *var_pos_weight = NULL; - PyObject *var_loss = NULL; - struct Nuitka_FrameObject *frame_4f67554983fc1bad95f8404ef1c044ec; - NUITKA_MAY_BE_UNUSED char const *type_description_1 = NULL; - int tmp_res; - PyObject *exception_type = NULL; - PyObject *exception_value = NULL; - PyTracebackObject *exception_tb = NULL; - NUITKA_MAY_BE_UNUSED int exception_lineno = 0; - PyObject *tmp_return_value = NULL; - static struct Nuitka_FrameObject *cache_frame_4f67554983fc1bad95f8404ef1c044ec = NULL; - PyObject *exception_keeper_type_1; - PyObject *exception_keeper_value_1; - PyTracebackObject *exception_keeper_tb_1; - NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_1; - - // Actual function body. - // Tried code: - if (isFrameUnusable(cache_frame_4f67554983fc1bad95f8404ef1c044ec)) { - Py_XDECREF(cache_frame_4f67554983fc1bad95f8404ef1c044ec); - -#if _DEBUG_REFCOUNTS - if (cache_frame_4f67554983fc1bad95f8404ef1c044ec == NULL) { - count_active_frame_cache_instances += 1; - } else { - count_released_frame_cache_instances += 1; - } - count_allocated_frame_cache_instances += 1; -#endif - cache_frame_4f67554983fc1bad95f8404ef1c044ec = MAKE_FUNCTION_FRAME(codeobj_4f67554983fc1bad95f8404ef1c044ec, module_models$unet3d$losses, sizeof(void *)+sizeof(void *)+sizeof(void *)+sizeof(void *)+sizeof(void *)+sizeof(void *)+sizeof(void *)+sizeof(void *)); -#if _DEBUG_REFCOUNTS - } else { - count_hit_frame_cache_instances += 1; -#endif - } - assert(cache_frame_4f67554983fc1bad95f8404ef1c044ec->m_type_description == NULL); - frame_4f67554983fc1bad95f8404ef1c044ec = cache_frame_4f67554983fc1bad95f8404ef1c044ec; - - // Push the new frame as the currently active one. - pushFrameStack(frame_4f67554983fc1bad95f8404ef1c044ec); - - // Mark the frame object as in use, ref count 1 will be up for reuse. - assert(Py_REFCNT(frame_4f67554983fc1bad95f8404ef1c044ec) == 2); // Frame stack - - // Framed code: - { - bool tmp_condition_result_1; - PyObject *tmp_compexpr_left_1; - PyObject *tmp_compexpr_right_1; - tmp_compexpr_left_1 = mod_consts[15]; - CHECK_OBJECT(par_config); - tmp_compexpr_right_1 = par_config; - tmp_res = PySequence_Contains(tmp_compexpr_right_1, tmp_compexpr_left_1); - if (tmp_res == -1) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 281; - type_description_1 = "oooooooo"; - goto frame_exception_exit_1; - } - tmp_condition_result_1 = (tmp_res == 0) ? true : false; - if (tmp_condition_result_1 != false) { - goto branch_yes_1; - } else { - goto branch_no_1; - } - } - branch_yes_1:; - { - PyObject *tmp_raise_type_1; - PyObject *tmp_raise_value_1; - tmp_raise_type_1 = PyExc_AssertionError; - tmp_raise_value_1 = mod_consts[91]; - exception_type = tmp_raise_type_1; - Py_INCREF(tmp_raise_type_1); - exception_value = tmp_raise_value_1; - Py_INCREF(tmp_raise_value_1); - exception_lineno = 281; - RAISE_EXCEPTION_WITH_VALUE(&exception_type, &exception_value, &exception_tb); - type_description_1 = "oooooooo"; - goto frame_exception_exit_1; - } - branch_no_1:; - { - PyObject *tmp_assign_source_1; - PyObject *tmp_expression_name_1; - PyObject *tmp_subscript_name_1; - CHECK_OBJECT(par_config); - tmp_expression_name_1 = par_config; - tmp_subscript_name_1 = mod_consts[15]; - tmp_assign_source_1 = LOOKUP_SUBSCRIPT(tmp_expression_name_1, tmp_subscript_name_1); - if (tmp_assign_source_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 282; - type_description_1 = "oooooooo"; - goto frame_exception_exit_1; - } - assert(var_loss_config == NULL); - var_loss_config = tmp_assign_source_1; - } - { - PyObject *tmp_assign_source_2; - PyObject *tmp_called_instance_1; - CHECK_OBJECT(var_loss_config); - tmp_called_instance_1 = var_loss_config; - frame_4f67554983fc1bad95f8404ef1c044ec->m_frame.f_lineno = 283; - tmp_assign_source_2 = CALL_METHOD_WITH_ARGS1( - tmp_called_instance_1, - mod_consts[92], - &PyTuple_GET_ITEM(mod_consts[93], 0) - ); - - if (tmp_assign_source_2 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 283; - type_description_1 = "oooooooo"; - goto frame_exception_exit_1; - } - assert(var_name == NULL); - var_name = tmp_assign_source_2; - } - { - PyObject *tmp_assign_source_3; - PyObject *tmp_called_instance_2; - if (var_loss_config == NULL) { - - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[94]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - exception_lineno = 285; - type_description_1 = "oooooooo"; - goto frame_exception_exit_1; - } - - tmp_called_instance_2 = var_loss_config; - frame_4f67554983fc1bad95f8404ef1c044ec->m_frame.f_lineno = 285; - tmp_assign_source_3 = CALL_METHOD_WITH_ARGS2( - tmp_called_instance_2, - mod_consts[92], - &PyTuple_GET_ITEM(mod_consts[95], 0) - ); - - if (tmp_assign_source_3 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 285; - type_description_1 = "oooooooo"; - goto frame_exception_exit_1; - } - assert(var_ignore_index == NULL); - var_ignore_index = tmp_assign_source_3; - } - { - PyObject *tmp_assign_source_4; - PyObject *tmp_called_instance_3; - if (var_loss_config == NULL) { - - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[94]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - exception_lineno = 286; - type_description_1 = "oooooooo"; - goto frame_exception_exit_1; - } - - tmp_called_instance_3 = var_loss_config; - frame_4f67554983fc1bad95f8404ef1c044ec->m_frame.f_lineno = 286; - tmp_assign_source_4 = CALL_METHOD_WITH_ARGS2( - tmp_called_instance_3, - mod_consts[92], - &PyTuple_GET_ITEM(mod_consts[96], 0) - ); - - if (tmp_assign_source_4 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 286; - type_description_1 = "oooooooo"; - goto frame_exception_exit_1; - } - assert(var_skip_last_target == NULL); - var_skip_last_target = tmp_assign_source_4; - } - { - PyObject *tmp_assign_source_5; - PyObject *tmp_called_instance_4; - if (var_loss_config == NULL) { - - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[94]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - exception_lineno = 287; - type_description_1 = "oooooooo"; - goto frame_exception_exit_1; - } - - tmp_called_instance_4 = var_loss_config; - frame_4f67554983fc1bad95f8404ef1c044ec->m_frame.f_lineno = 287; - tmp_assign_source_5 = CALL_METHOD_WITH_ARGS2( - tmp_called_instance_4, - mod_consts[92], - &PyTuple_GET_ITEM(mod_consts[97], 0) - ); - - if (tmp_assign_source_5 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 287; - type_description_1 = "oooooooo"; - goto frame_exception_exit_1; - } - assert(var_weight == NULL); - var_weight = tmp_assign_source_5; - } - { - bool tmp_condition_result_2; - PyObject *tmp_compexpr_left_2; - PyObject *tmp_compexpr_right_2; - CHECK_OBJECT(var_weight); - tmp_compexpr_left_2 = var_weight; - tmp_compexpr_right_2 = Py_None; - tmp_condition_result_2 = (tmp_compexpr_left_2 != tmp_compexpr_right_2) ? true : false; - if (tmp_condition_result_2 != false) { - goto branch_yes_2; - } else { - goto branch_no_2; - } - } - branch_yes_2:; - { - PyObject *tmp_assign_source_6; - PyObject *tmp_called_instance_5; - PyObject *tmp_args_element_name_1; - tmp_called_instance_5 = GET_STRING_DICT_VALUE(moduledict_models$unet3d$losses, (Nuitka_StringObject *)mod_consts[28]); - - if (unlikely(tmp_called_instance_5 == NULL)) { - tmp_called_instance_5 = GET_MODULE_VARIABLE_VALUE_FALLBACK(mod_consts[28]); - } - - if (tmp_called_instance_5 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 290; - type_description_1 = "oooooooo"; - goto frame_exception_exit_1; - } - CHECK_OBJECT(var_weight); - tmp_args_element_name_1 = var_weight; - frame_4f67554983fc1bad95f8404ef1c044ec->m_frame.f_lineno = 290; - tmp_assign_source_6 = CALL_METHOD_WITH_SINGLE_ARG(tmp_called_instance_5, mod_consts[85], tmp_args_element_name_1); - if (tmp_assign_source_6 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 290; - type_description_1 = "oooooooo"; - goto frame_exception_exit_1; - } - { - PyObject *old = var_weight; - var_weight = tmp_assign_source_6; - Py_XDECREF(old); - } - - } - branch_no_2:; - { - PyObject *tmp_assign_source_7; - PyObject *tmp_called_instance_6; - if (var_loss_config == NULL) { - - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[94]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - exception_lineno = 292; - type_description_1 = "oooooooo"; - goto frame_exception_exit_1; - } - - tmp_called_instance_6 = var_loss_config; - frame_4f67554983fc1bad95f8404ef1c044ec->m_frame.f_lineno = 292; - tmp_assign_source_7 = CALL_METHOD_WITH_ARGS2( - tmp_called_instance_6, - mod_consts[92], - &PyTuple_GET_ITEM(mod_consts[98], 0) - ); - - if (tmp_assign_source_7 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 292; - type_description_1 = "oooooooo"; - goto frame_exception_exit_1; - } - assert(var_pos_weight == NULL); - var_pos_weight = tmp_assign_source_7; - } - { - bool tmp_condition_result_3; - PyObject *tmp_compexpr_left_3; - PyObject *tmp_compexpr_right_3; - CHECK_OBJECT(var_pos_weight); - tmp_compexpr_left_3 = var_pos_weight; - tmp_compexpr_right_3 = Py_None; - tmp_condition_result_3 = (tmp_compexpr_left_3 != tmp_compexpr_right_3) ? true : false; - if (tmp_condition_result_3 != false) { - goto branch_yes_3; - } else { - goto branch_no_3; - } - } - branch_yes_3:; - { - PyObject *tmp_assign_source_8; - PyObject *tmp_called_instance_7; - PyObject *tmp_args_element_name_2; - tmp_called_instance_7 = GET_STRING_DICT_VALUE(moduledict_models$unet3d$losses, (Nuitka_StringObject *)mod_consts[28]); - - if (unlikely(tmp_called_instance_7 == NULL)) { - tmp_called_instance_7 = GET_MODULE_VARIABLE_VALUE_FALLBACK(mod_consts[28]); - } - - if (tmp_called_instance_7 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 294; - type_description_1 = "oooooooo"; - goto frame_exception_exit_1; - } - CHECK_OBJECT(var_pos_weight); - tmp_args_element_name_2 = var_pos_weight; - frame_4f67554983fc1bad95f8404ef1c044ec->m_frame.f_lineno = 294; - tmp_assign_source_8 = CALL_METHOD_WITH_SINGLE_ARG(tmp_called_instance_7, mod_consts[85], tmp_args_element_name_2); - if (tmp_assign_source_8 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 294; - type_description_1 = "oooooooo"; - goto frame_exception_exit_1; - } - { - PyObject *old = var_pos_weight; - var_pos_weight = tmp_assign_source_8; - Py_XDECREF(old); - } - - } - branch_no_3:; - { - PyObject *tmp_assign_source_9; - PyObject *tmp_called_name_1; - PyObject *tmp_args_element_name_3; - PyObject *tmp_args_element_name_4; - PyObject *tmp_args_element_name_5; - PyObject *tmp_args_element_name_6; - PyObject *tmp_args_element_name_7; - tmp_called_name_1 = GET_STRING_DICT_VALUE(moduledict_models$unet3d$losses, (Nuitka_StringObject *)mod_consts[99]); - - if (unlikely(tmp_called_name_1 == NULL)) { - tmp_called_name_1 = GET_MODULE_VARIABLE_VALUE_FALLBACK(mod_consts[99]); - } - - if (tmp_called_name_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 296; - type_description_1 = "oooooooo"; - goto frame_exception_exit_1; - } - CHECK_OBJECT(var_name); - tmp_args_element_name_3 = var_name; - if (var_loss_config == NULL) { - - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[94]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - exception_lineno = 296; - type_description_1 = "oooooooo"; - goto frame_exception_exit_1; - } - - tmp_args_element_name_4 = var_loss_config; - CHECK_OBJECT(var_weight); - tmp_args_element_name_5 = var_weight; - CHECK_OBJECT(var_ignore_index); - tmp_args_element_name_6 = var_ignore_index; - CHECK_OBJECT(var_pos_weight); - tmp_args_element_name_7 = var_pos_weight; - frame_4f67554983fc1bad95f8404ef1c044ec->m_frame.f_lineno = 296; - { - PyObject *call_args[] = {tmp_args_element_name_3, tmp_args_element_name_4, tmp_args_element_name_5, tmp_args_element_name_6, tmp_args_element_name_7}; - tmp_assign_source_9 = CALL_FUNCTION_WITH_ARGS5(tmp_called_name_1, call_args); - } - - if (tmp_assign_source_9 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 296; - type_description_1 = "oooooooo"; - goto frame_exception_exit_1; - } - assert(var_loss == NULL); - var_loss = tmp_assign_source_9; - } - { - bool tmp_condition_result_4; - PyObject *tmp_operand_name_1; - int tmp_or_left_truth_1; - PyObject *tmp_or_left_value_1; - PyObject *tmp_or_right_value_1; - PyObject *tmp_compexpr_left_4; - PyObject *tmp_compexpr_right_4; - PyObject *tmp_compexpr_left_5; - PyObject *tmp_compexpr_right_5; - CHECK_OBJECT(var_ignore_index); - tmp_compexpr_left_4 = var_ignore_index; - tmp_compexpr_right_4 = Py_None; - tmp_or_left_value_1 = (tmp_compexpr_left_4 == tmp_compexpr_right_4) ? Py_True : Py_False; - tmp_or_left_truth_1 = CHECK_IF_TRUE(tmp_or_left_value_1); - if (tmp_or_left_truth_1 == 1) { - goto or_left_1; - } else { - goto or_right_1; - } - or_right_1:; - CHECK_OBJECT(var_name); - tmp_compexpr_left_5 = var_name; - tmp_compexpr_right_5 = LIST_COPY(mod_consts[100]); - tmp_res = PySequence_Contains(tmp_compexpr_right_5, tmp_compexpr_left_5); - Py_DECREF(tmp_compexpr_right_5); - if (tmp_res == -1) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 298; - type_description_1 = "oooooooo"; - goto frame_exception_exit_1; - } - tmp_or_right_value_1 = (tmp_res == 1) ? Py_True : Py_False; - tmp_operand_name_1 = tmp_or_right_value_1; - goto or_end_1; - or_left_1:; - tmp_operand_name_1 = tmp_or_left_value_1; - or_end_1:; - tmp_res = CHECK_IF_TRUE(tmp_operand_name_1); - assert(!(tmp_res == -1)); - tmp_condition_result_4 = (tmp_res == 0) ? true : false; - if (tmp_condition_result_4 != false) { - goto branch_yes_4; - } else { - goto branch_no_4; - } - } - branch_yes_4:; - { - PyObject *tmp_assign_source_10; - PyObject *tmp_called_name_2; - PyObject *tmp_args_element_name_8; - PyObject *tmp_args_element_name_9; - tmp_called_name_2 = GET_STRING_DICT_VALUE(moduledict_models$unet3d$losses, (Nuitka_StringObject *)mod_consts[12]); - - if (unlikely(tmp_called_name_2 == NULL)) { - tmp_called_name_2 = GET_MODULE_VARIABLE_VALUE_FALLBACK(mod_consts[12]); - } - - if (tmp_called_name_2 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 300; - type_description_1 = "oooooooo"; - goto frame_exception_exit_1; - } - CHECK_OBJECT(var_loss); - tmp_args_element_name_8 = var_loss; - CHECK_OBJECT(var_ignore_index); - tmp_args_element_name_9 = var_ignore_index; - frame_4f67554983fc1bad95f8404ef1c044ec->m_frame.f_lineno = 300; - { - PyObject *call_args[] = {tmp_args_element_name_8, tmp_args_element_name_9}; - tmp_assign_source_10 = CALL_FUNCTION_WITH_ARGS2(tmp_called_name_2, call_args); - } - - if (tmp_assign_source_10 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 300; - type_description_1 = "oooooooo"; - goto frame_exception_exit_1; - } - { - PyObject *old = var_loss; - assert(old != NULL); - var_loss = tmp_assign_source_10; - Py_DECREF(old); - } - - } - branch_no_4:; - { - nuitka_bool tmp_condition_result_5; - int tmp_truth_name_1; - CHECK_OBJECT(var_skip_last_target); - tmp_truth_name_1 = CHECK_IF_TRUE(var_skip_last_target); - if (tmp_truth_name_1 == -1) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 302; - type_description_1 = "oooooooo"; - goto frame_exception_exit_1; - } - tmp_condition_result_5 = tmp_truth_name_1 == 0 ? NUITKA_BOOL_FALSE : NUITKA_BOOL_TRUE; - if (tmp_condition_result_5 == NUITKA_BOOL_TRUE) { - goto branch_yes_5; - } else { - goto branch_no_5; - } - } - branch_yes_5:; - { - PyObject *tmp_assign_source_11; - PyObject *tmp_called_name_3; - PyObject *tmp_args_element_name_10; - PyObject *tmp_args_element_name_11; - PyObject *tmp_called_instance_8; - tmp_called_name_3 = GET_STRING_DICT_VALUE(moduledict_models$unet3d$losses, (Nuitka_StringObject *)mod_consts[22]); - - if (unlikely(tmp_called_name_3 == NULL)) { - tmp_called_name_3 = GET_MODULE_VARIABLE_VALUE_FALLBACK(mod_consts[22]); - } - - if (tmp_called_name_3 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 303; - type_description_1 = "oooooooo"; - goto frame_exception_exit_1; - } - CHECK_OBJECT(var_loss); - tmp_args_element_name_10 = var_loss; - if (var_loss_config == NULL) { - - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[94]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - exception_lineno = 303; - type_description_1 = "oooooooo"; - goto frame_exception_exit_1; - } - - tmp_called_instance_8 = var_loss_config; - frame_4f67554983fc1bad95f8404ef1c044ec->m_frame.f_lineno = 303; - tmp_args_element_name_11 = CALL_METHOD_WITH_ARGS2( - tmp_called_instance_8, - mod_consts[101], - &PyTuple_GET_ITEM(mod_consts[102], 0) - ); - - if (tmp_args_element_name_11 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 303; - type_description_1 = "oooooooo"; - goto frame_exception_exit_1; - } - frame_4f67554983fc1bad95f8404ef1c044ec->m_frame.f_lineno = 303; - { - PyObject *call_args[] = {tmp_args_element_name_10, tmp_args_element_name_11}; - tmp_assign_source_11 = CALL_FUNCTION_WITH_ARGS2(tmp_called_name_3, call_args); - } - - Py_DECREF(tmp_args_element_name_11); - if (tmp_assign_source_11 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 303; - type_description_1 = "oooooooo"; - goto frame_exception_exit_1; - } - { - PyObject *old = var_loss; - assert(old != NULL); - var_loss = tmp_assign_source_11; - Py_DECREF(old); - } - - } - branch_no_5:; - { - nuitka_bool tmp_condition_result_6; - PyObject *tmp_called_instance_9; - PyObject *tmp_expression_name_2; - PyObject *tmp_call_result_1; - int tmp_truth_name_2; - tmp_expression_name_2 = GET_STRING_DICT_VALUE(moduledict_models$unet3d$losses, (Nuitka_StringObject *)mod_consts[28]); - - if (unlikely(tmp_expression_name_2 == NULL)) { - tmp_expression_name_2 = GET_MODULE_VARIABLE_VALUE_FALLBACK(mod_consts[28]); - } - - if (tmp_expression_name_2 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 305; - type_description_1 = "oooooooo"; - goto frame_exception_exit_1; - } - tmp_called_instance_9 = LOOKUP_ATTRIBUTE(tmp_expression_name_2, mod_consts[76]); - if (tmp_called_instance_9 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 305; - type_description_1 = "oooooooo"; - goto frame_exception_exit_1; - } - frame_4f67554983fc1bad95f8404ef1c044ec->m_frame.f_lineno = 305; - tmp_call_result_1 = CALL_METHOD_NO_ARGS(tmp_called_instance_9, mod_consts[103]); - Py_DECREF(tmp_called_instance_9); - if (tmp_call_result_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 305; - type_description_1 = "oooooooo"; - goto frame_exception_exit_1; - } - tmp_truth_name_2 = CHECK_IF_TRUE(tmp_call_result_1); - if (tmp_truth_name_2 == -1) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - Py_DECREF(tmp_call_result_1); - - exception_lineno = 305; - type_description_1 = "oooooooo"; - goto frame_exception_exit_1; - } - tmp_condition_result_6 = tmp_truth_name_2 == 0 ? NUITKA_BOOL_FALSE : NUITKA_BOOL_TRUE; - Py_DECREF(tmp_call_result_1); - if (tmp_condition_result_6 == NUITKA_BOOL_TRUE) { - goto branch_yes_6; - } else { - goto branch_no_6; - } - } - branch_yes_6:; - { - PyObject *tmp_assign_source_12; - PyObject *tmp_called_instance_10; - if (var_loss == NULL) { - - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[15]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - exception_lineno = 306; - type_description_1 = "oooooooo"; - goto frame_exception_exit_1; - } - - tmp_called_instance_10 = var_loss; - frame_4f67554983fc1bad95f8404ef1c044ec->m_frame.f_lineno = 306; - tmp_assign_source_12 = CALL_METHOD_NO_ARGS(tmp_called_instance_10, mod_consts[76]); - if (tmp_assign_source_12 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 306; - type_description_1 = "oooooooo"; - goto frame_exception_exit_1; - } - { - PyObject *old = var_loss; - var_loss = tmp_assign_source_12; - Py_XDECREF(old); - } - - } - branch_no_6:; - if (var_loss == NULL) { - - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[15]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - exception_lineno = 308; - type_description_1 = "oooooooo"; - goto frame_exception_exit_1; - } - - tmp_return_value = var_loss; - Py_INCREF(tmp_return_value); - goto frame_return_exit_1; - -#if 0 - RESTORE_FRAME_EXCEPTION(frame_4f67554983fc1bad95f8404ef1c044ec); -#endif - - // Put the previous frame back on top. - popFrameStack(); - - goto frame_no_exception_1; - - frame_return_exit_1:; -#if 0 - RESTORE_FRAME_EXCEPTION(frame_4f67554983fc1bad95f8404ef1c044ec); -#endif - - // Put the previous frame back on top. - popFrameStack(); - - goto try_return_handler_1; - - frame_exception_exit_1:; - -#if 0 - RESTORE_FRAME_EXCEPTION(frame_4f67554983fc1bad95f8404ef1c044ec); -#endif - - if (exception_tb == NULL) { - exception_tb = MAKE_TRACEBACK(frame_4f67554983fc1bad95f8404ef1c044ec, exception_lineno); - } else if (exception_tb->tb_frame != &frame_4f67554983fc1bad95f8404ef1c044ec->m_frame) { - exception_tb = ADD_TRACEBACK(exception_tb, frame_4f67554983fc1bad95f8404ef1c044ec, exception_lineno); - } - - // Attaches locals to frame if any. - Nuitka_Frame_AttachLocals( - frame_4f67554983fc1bad95f8404ef1c044ec, - type_description_1, - par_config, - var_loss_config, - var_name, - var_ignore_index, - var_skip_last_target, - var_weight, - var_pos_weight, - var_loss - ); - - - // Release cached frame if used for exception. - if (frame_4f67554983fc1bad95f8404ef1c044ec == cache_frame_4f67554983fc1bad95f8404ef1c044ec) { -#if _DEBUG_REFCOUNTS - count_active_frame_cache_instances -= 1; - count_released_frame_cache_instances += 1; -#endif - - Py_DECREF(cache_frame_4f67554983fc1bad95f8404ef1c044ec); - cache_frame_4f67554983fc1bad95f8404ef1c044ec = NULL; - } - - assertFrameObject(frame_4f67554983fc1bad95f8404ef1c044ec); - - // Put the previous frame back on top. - popFrameStack(); - - // Return the error. - goto try_except_handler_1; - - frame_no_exception_1:; - NUITKA_CANNOT_GET_HERE("tried codes exits in all cases"); - return NULL; - // Return handler code: - try_return_handler_1:; - CHECK_OBJECT(par_config); - Py_DECREF(par_config); - par_config = NULL; - Py_XDECREF(var_loss_config); - var_loss_config = NULL; - CHECK_OBJECT(var_name); - Py_DECREF(var_name); - var_name = NULL; - CHECK_OBJECT(var_ignore_index); - Py_DECREF(var_ignore_index); - var_ignore_index = NULL; - CHECK_OBJECT(var_skip_last_target); - Py_DECREF(var_skip_last_target); - var_skip_last_target = NULL; - CHECK_OBJECT(var_weight); - Py_DECREF(var_weight); - var_weight = NULL; - CHECK_OBJECT(var_pos_weight); - Py_DECREF(var_pos_weight); - var_pos_weight = NULL; - Py_XDECREF(var_loss); - var_loss = NULL; - goto function_return_exit; - // Exception handler code: - try_except_handler_1:; - exception_keeper_type_1 = exception_type; - exception_keeper_value_1 = exception_value; - exception_keeper_tb_1 = exception_tb; - exception_keeper_lineno_1 = exception_lineno; - exception_type = NULL; - exception_value = NULL; - exception_tb = NULL; - exception_lineno = 0; - - CHECK_OBJECT(par_config); - Py_DECREF(par_config); - par_config = NULL; - Py_XDECREF(var_loss_config); - var_loss_config = NULL; - Py_XDECREF(var_name); - var_name = NULL; - Py_XDECREF(var_ignore_index); - var_ignore_index = NULL; - Py_XDECREF(var_skip_last_target); - var_skip_last_target = NULL; - Py_XDECREF(var_weight); - var_weight = NULL; - Py_XDECREF(var_pos_weight); - var_pos_weight = NULL; - Py_XDECREF(var_loss); - var_loss = NULL; - // Re-raise. - exception_type = exception_keeper_type_1; - exception_value = exception_keeper_value_1; - exception_tb = exception_keeper_tb_1; - exception_lineno = exception_keeper_lineno_1; - - goto function_exception_exit; - // End of try: - - NUITKA_CANNOT_GET_HERE("Return statement must have exited already."); - return NULL; - -function_exception_exit: - assert(exception_type); - RESTORE_ERROR_OCCURRED(exception_type, exception_value, exception_tb); - - return NULL; - -function_return_exit: - // Function cleanup code if any. - - - // Actual function exit with return value, making sure we did not make - // the error status worse despite non-NULL return. - CHECK_OBJECT(tmp_return_value); - assert(had_error || !ERROR_OCCURRED()); - return tmp_return_value; -} - - -static PyObject *impl_models$unet3d$losses$$$function__24__create_loss(struct Nuitka_FunctionObject const *self, PyObject **python_pars) { - // Preserve error status for checks -#ifndef __NUITKA_NO_ASSERT__ - NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED(); -#endif - - // Local variable declarations. - PyObject *par_name = python_pars[0]; - PyObject *par_loss_config = python_pars[1]; - PyObject *par_weight = python_pars[2]; - PyObject *par_ignore_index = python_pars[3]; - PyObject *par_pos_weight = python_pars[4]; - PyObject *var_alpha = NULL; - PyObject *var_beta = NULL; - PyObject *var_normalization = NULL; - struct Nuitka_FrameObject *frame_48d8d9a1daf8117bcef99d7047b108c4; - NUITKA_MAY_BE_UNUSED char const *type_description_1 = NULL; - PyObject *exception_type = NULL; - PyObject *exception_value = NULL; - PyTracebackObject *exception_tb = NULL; - NUITKA_MAY_BE_UNUSED int exception_lineno = 0; - PyObject *tmp_return_value = NULL; - int tmp_res; - static struct Nuitka_FrameObject *cache_frame_48d8d9a1daf8117bcef99d7047b108c4 = NULL; - PyObject *exception_keeper_type_1; - PyObject *exception_keeper_value_1; - PyTracebackObject *exception_keeper_tb_1; - NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_1; - - // Actual function body. - // Tried code: - if (isFrameUnusable(cache_frame_48d8d9a1daf8117bcef99d7047b108c4)) { - Py_XDECREF(cache_frame_48d8d9a1daf8117bcef99d7047b108c4); - -#if _DEBUG_REFCOUNTS - if (cache_frame_48d8d9a1daf8117bcef99d7047b108c4 == NULL) { - count_active_frame_cache_instances += 1; - } else { - count_released_frame_cache_instances += 1; - } - count_allocated_frame_cache_instances += 1; -#endif - cache_frame_48d8d9a1daf8117bcef99d7047b108c4 = MAKE_FUNCTION_FRAME(codeobj_48d8d9a1daf8117bcef99d7047b108c4, module_models$unet3d$losses, sizeof(void *)+sizeof(void *)+sizeof(void *)+sizeof(void *)+sizeof(void *)+sizeof(void *)+sizeof(void *)+sizeof(void *)); -#if _DEBUG_REFCOUNTS - } else { - count_hit_frame_cache_instances += 1; -#endif - } - assert(cache_frame_48d8d9a1daf8117bcef99d7047b108c4->m_type_description == NULL); - frame_48d8d9a1daf8117bcef99d7047b108c4 = cache_frame_48d8d9a1daf8117bcef99d7047b108c4; - - // Push the new frame as the currently active one. - pushFrameStack(frame_48d8d9a1daf8117bcef99d7047b108c4); - - // Mark the frame object as in use, ref count 1 will be up for reuse. - assert(Py_REFCNT(frame_48d8d9a1daf8117bcef99d7047b108c4) == 2); // Frame stack - - // Framed code: - { - nuitka_bool tmp_condition_result_1; - PyObject *tmp_compexpr_left_1; - PyObject *tmp_compexpr_right_1; - PyObject *tmp_tmp_condition_result_1_object_1; - int tmp_truth_name_1; - CHECK_OBJECT(par_name); - tmp_compexpr_left_1 = par_name; - tmp_compexpr_right_1 = mod_consts[55]; - tmp_tmp_condition_result_1_object_1 = RICH_COMPARE_EQ_OBJECT_OBJECT_OBJECT(tmp_compexpr_left_1, tmp_compexpr_right_1); - if (tmp_tmp_condition_result_1_object_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 314; - type_description_1 = "oooooooo"; - goto frame_exception_exit_1; - } - tmp_truth_name_1 = CHECK_IF_TRUE(tmp_tmp_condition_result_1_object_1); - if (tmp_truth_name_1 == -1) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - Py_DECREF(tmp_tmp_condition_result_1_object_1); - - exception_lineno = 314; - type_description_1 = "oooooooo"; - goto frame_exception_exit_1; - } - tmp_condition_result_1 = tmp_truth_name_1 == 0 ? NUITKA_BOOL_FALSE : NUITKA_BOOL_TRUE; - Py_DECREF(tmp_tmp_condition_result_1_object_1); - if (tmp_condition_result_1 == NUITKA_BOOL_TRUE) { - goto branch_yes_1; - } else { - goto branch_no_1; - } - } - branch_yes_1:; - { - PyObject *tmp_called_name_1; - PyObject *tmp_expression_name_1; - PyObject *tmp_kwargs_name_1; - PyObject *tmp_dict_key_1; - PyObject *tmp_dict_value_1; - tmp_expression_name_1 = GET_STRING_DICT_VALUE(moduledict_models$unet3d$losses, (Nuitka_StringObject *)mod_consts[36]); - - if (unlikely(tmp_expression_name_1 == NULL)) { - tmp_expression_name_1 = GET_MODULE_VARIABLE_VALUE_FALLBACK(mod_consts[36]); - } - - if (tmp_expression_name_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 315; - type_description_1 = "oooooooo"; - goto frame_exception_exit_1; - } - tmp_called_name_1 = LOOKUP_ATTRIBUTE(tmp_expression_name_1, mod_consts[55]); - if (tmp_called_name_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 315; - type_description_1 = "oooooooo"; - goto frame_exception_exit_1; - } - tmp_dict_key_1 = mod_consts[105]; - CHECK_OBJECT(par_pos_weight); - tmp_dict_value_1 = par_pos_weight; - tmp_kwargs_name_1 = _PyDict_NewPresized( 1 ); - tmp_res = PyDict_SetItem(tmp_kwargs_name_1, tmp_dict_key_1, tmp_dict_value_1); - assert(!(tmp_res != 0)); - frame_48d8d9a1daf8117bcef99d7047b108c4->m_frame.f_lineno = 315; - tmp_return_value = CALL_FUNCTION_WITH_KEYARGS(tmp_called_name_1, tmp_kwargs_name_1); - Py_DECREF(tmp_called_name_1); - Py_DECREF(tmp_kwargs_name_1); - if (tmp_return_value == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 315; - type_description_1 = "oooooooo"; - goto frame_exception_exit_1; - } - goto frame_return_exit_1; - } - goto branch_end_1; - branch_no_1:; - { - nuitka_bool tmp_condition_result_2; - PyObject *tmp_compexpr_left_2; - PyObject *tmp_compexpr_right_2; - PyObject *tmp_tmp_condition_result_2_object_1; - int tmp_truth_name_2; - CHECK_OBJECT(par_name); - tmp_compexpr_left_2 = par_name; - tmp_compexpr_right_2 = mod_consts[53]; - tmp_tmp_condition_result_2_object_1 = RICH_COMPARE_EQ_OBJECT_OBJECT_OBJECT(tmp_compexpr_left_2, tmp_compexpr_right_2); - if (tmp_tmp_condition_result_2_object_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 316; - type_description_1 = "oooooooo"; - goto frame_exception_exit_1; - } - tmp_truth_name_2 = CHECK_IF_TRUE(tmp_tmp_condition_result_2_object_1); - if (tmp_truth_name_2 == -1) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - Py_DECREF(tmp_tmp_condition_result_2_object_1); - - exception_lineno = 316; - type_description_1 = "oooooooo"; - goto frame_exception_exit_1; - } - tmp_condition_result_2 = tmp_truth_name_2 == 0 ? NUITKA_BOOL_FALSE : NUITKA_BOOL_TRUE; - Py_DECREF(tmp_tmp_condition_result_2_object_1); - if (tmp_condition_result_2 == NUITKA_BOOL_TRUE) { - goto branch_yes_2; - } else { - goto branch_no_2; - } - } - branch_yes_2:; - { - PyObject *tmp_assign_source_1; - PyObject *tmp_called_instance_1; - CHECK_OBJECT(par_loss_config); - tmp_called_instance_1 = par_loss_config; - frame_48d8d9a1daf8117bcef99d7047b108c4->m_frame.f_lineno = 317; - tmp_assign_source_1 = CALL_METHOD_WITH_ARGS2( - tmp_called_instance_1, - mod_consts[101], - &PyTuple_GET_ITEM(mod_consts[106], 0) - ); - - if (tmp_assign_source_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 317; - type_description_1 = "oooooooo"; - goto frame_exception_exit_1; - } - assert(var_alpha == NULL); - var_alpha = tmp_assign_source_1; - } - { - PyObject *tmp_assign_source_2; - PyObject *tmp_called_instance_2; - if (par_loss_config == NULL) { - - FORMAT_UNBOUND_LOCAL_ERROR(&exception_type, &exception_value, mod_consts[94]); - exception_tb = NULL; - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - exception_lineno = 318; - type_description_1 = "oooooooo"; - goto frame_exception_exit_1; - } - - tmp_called_instance_2 = par_loss_config; - frame_48d8d9a1daf8117bcef99d7047b108c4->m_frame.f_lineno = 318; - tmp_assign_source_2 = CALL_METHOD_WITH_ARGS2( - tmp_called_instance_2, - mod_consts[101], - &PyTuple_GET_ITEM(mod_consts[107], 0) - ); - - if (tmp_assign_source_2 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 318; - type_description_1 = "oooooooo"; - goto frame_exception_exit_1; - } - assert(var_beta == NULL); - var_beta = tmp_assign_source_2; - } - { - PyObject *tmp_called_name_2; - PyObject *tmp_args_element_name_1; - PyObject *tmp_args_element_name_2; - tmp_called_name_2 = GET_STRING_DICT_VALUE(moduledict_models$unet3d$losses, (Nuitka_StringObject *)mod_consts[53]); - - if (unlikely(tmp_called_name_2 == NULL)) { - tmp_called_name_2 = GET_MODULE_VARIABLE_VALUE_FALLBACK(mod_consts[53]); - } - - if (tmp_called_name_2 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 319; - type_description_1 = "oooooooo"; - goto frame_exception_exit_1; - } - CHECK_OBJECT(var_alpha); - tmp_args_element_name_1 = var_alpha; - CHECK_OBJECT(var_beta); - tmp_args_element_name_2 = var_beta; - frame_48d8d9a1daf8117bcef99d7047b108c4->m_frame.f_lineno = 319; - { - PyObject *call_args[] = {tmp_args_element_name_1, tmp_args_element_name_2}; - tmp_return_value = CALL_FUNCTION_WITH_ARGS2(tmp_called_name_2, call_args); - } - - if (tmp_return_value == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 319; - type_description_1 = "oooooooo"; - goto frame_exception_exit_1; - } - goto frame_return_exit_1; - } - goto branch_end_2; - branch_no_2:; - { - nuitka_bool tmp_condition_result_3; - PyObject *tmp_compexpr_left_3; - PyObject *tmp_compexpr_right_3; - PyObject *tmp_tmp_condition_result_3_object_1; - int tmp_truth_name_3; - CHECK_OBJECT(par_name); - tmp_compexpr_left_3 = par_name; - tmp_compexpr_right_3 = mod_consts[108]; - tmp_tmp_condition_result_3_object_1 = RICH_COMPARE_EQ_OBJECT_OBJECT_OBJECT(tmp_compexpr_left_3, tmp_compexpr_right_3); - if (tmp_tmp_condition_result_3_object_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 320; - type_description_1 = "oooooooo"; - goto frame_exception_exit_1; - } - tmp_truth_name_3 = CHECK_IF_TRUE(tmp_tmp_condition_result_3_object_1); - if (tmp_truth_name_3 == -1) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - Py_DECREF(tmp_tmp_condition_result_3_object_1); - - exception_lineno = 320; - type_description_1 = "oooooooo"; - goto frame_exception_exit_1; - } - tmp_condition_result_3 = tmp_truth_name_3 == 0 ? NUITKA_BOOL_FALSE : NUITKA_BOOL_TRUE; - Py_DECREF(tmp_tmp_condition_result_3_object_1); - if (tmp_condition_result_3 == NUITKA_BOOL_TRUE) { - goto branch_yes_3; - } else { - goto branch_no_3; - } - } - branch_yes_3:; - { - bool tmp_condition_result_4; - PyObject *tmp_compexpr_left_4; - PyObject *tmp_compexpr_right_4; - CHECK_OBJECT(par_ignore_index); - tmp_compexpr_left_4 = par_ignore_index; - tmp_compexpr_right_4 = Py_None; - tmp_condition_result_4 = (tmp_compexpr_left_4 == tmp_compexpr_right_4) ? true : false; - if (tmp_condition_result_4 != false) { - goto branch_yes_4; - } else { - goto branch_no_4; - } - } - branch_yes_4:; - { - PyObject *tmp_assign_source_3; - tmp_assign_source_3 = mod_consts[109]; - { - PyObject *old = par_ignore_index; - assert(old != NULL); - par_ignore_index = tmp_assign_source_3; - Py_INCREF(par_ignore_index); - Py_DECREF(old); - } - - } - branch_no_4:; - { - PyObject *tmp_called_name_3; - PyObject *tmp_expression_name_2; - PyObject *tmp_kwargs_name_2; - PyObject *tmp_dict_key_2; - PyObject *tmp_dict_value_2; - tmp_expression_name_2 = GET_STRING_DICT_VALUE(moduledict_models$unet3d$losses, (Nuitka_StringObject *)mod_consts[36]); - - if (unlikely(tmp_expression_name_2 == NULL)) { - tmp_expression_name_2 = GET_MODULE_VARIABLE_VALUE_FALLBACK(mod_consts[36]); - } - - if (tmp_expression_name_2 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 323; - type_description_1 = "oooooooo"; - goto frame_exception_exit_1; - } - tmp_called_name_3 = LOOKUP_ATTRIBUTE(tmp_expression_name_2, mod_consts[108]); - if (tmp_called_name_3 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 323; - type_description_1 = "oooooooo"; - goto frame_exception_exit_1; - } - tmp_dict_key_2 = mod_consts[33]; - CHECK_OBJECT(par_weight); - tmp_dict_value_2 = par_weight; - tmp_kwargs_name_2 = _PyDict_NewPresized( 2 ); - tmp_res = PyDict_SetItem(tmp_kwargs_name_2, tmp_dict_key_2, tmp_dict_value_2); - assert(!(tmp_res != 0)); - tmp_dict_key_2 = mod_consts[16]; - CHECK_OBJECT(par_ignore_index); - tmp_dict_value_2 = par_ignore_index; - tmp_res = PyDict_SetItem(tmp_kwargs_name_2, tmp_dict_key_2, tmp_dict_value_2); - assert(!(tmp_res != 0)); - frame_48d8d9a1daf8117bcef99d7047b108c4->m_frame.f_lineno = 323; - tmp_return_value = CALL_FUNCTION_WITH_KEYARGS(tmp_called_name_3, tmp_kwargs_name_2); - Py_DECREF(tmp_called_name_3); - Py_DECREF(tmp_kwargs_name_2); - if (tmp_return_value == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 323; - type_description_1 = "oooooooo"; - goto frame_exception_exit_1; - } - goto frame_return_exit_1; - } - goto branch_end_3; - branch_no_3:; - { - nuitka_bool tmp_condition_result_5; - PyObject *tmp_compexpr_left_5; - PyObject *tmp_compexpr_right_5; - PyObject *tmp_tmp_condition_result_5_object_1; - int tmp_truth_name_4; - CHECK_OBJECT(par_name); - tmp_compexpr_left_5 = par_name; - tmp_compexpr_right_5 = mod_consts[59]; - tmp_tmp_condition_result_5_object_1 = RICH_COMPARE_EQ_OBJECT_OBJECT_OBJECT(tmp_compexpr_left_5, tmp_compexpr_right_5); - if (tmp_tmp_condition_result_5_object_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 324; - type_description_1 = "oooooooo"; - goto frame_exception_exit_1; - } - tmp_truth_name_4 = CHECK_IF_TRUE(tmp_tmp_condition_result_5_object_1); - if (tmp_truth_name_4 == -1) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - Py_DECREF(tmp_tmp_condition_result_5_object_1); - - exception_lineno = 324; - type_description_1 = "oooooooo"; - goto frame_exception_exit_1; - } - tmp_condition_result_5 = tmp_truth_name_4 == 0 ? NUITKA_BOOL_FALSE : NUITKA_BOOL_TRUE; - Py_DECREF(tmp_tmp_condition_result_5_object_1); - if (tmp_condition_result_5 == NUITKA_BOOL_TRUE) { - goto branch_yes_5; - } else { - goto branch_no_5; - } - } - branch_yes_5:; - { - bool tmp_condition_result_6; - PyObject *tmp_compexpr_left_6; - PyObject *tmp_compexpr_right_6; - CHECK_OBJECT(par_ignore_index); - tmp_compexpr_left_6 = par_ignore_index; - tmp_compexpr_right_6 = Py_None; - tmp_condition_result_6 = (tmp_compexpr_left_6 == tmp_compexpr_right_6) ? true : false; - if (tmp_condition_result_6 != false) { - goto branch_yes_6; - } else { - goto branch_no_6; - } - } - branch_yes_6:; - { - PyObject *tmp_assign_source_4; - tmp_assign_source_4 = mod_consts[109]; - { - PyObject *old = par_ignore_index; - assert(old != NULL); - par_ignore_index = tmp_assign_source_4; - Py_INCREF(par_ignore_index); - Py_DECREF(old); - } - - } - branch_no_6:; - { - PyObject *tmp_called_name_4; - PyObject *tmp_kwargs_name_3; - PyObject *tmp_dict_key_3; - PyObject *tmp_dict_value_3; - tmp_called_name_4 = GET_STRING_DICT_VALUE(moduledict_models$unet3d$losses, (Nuitka_StringObject *)mod_consts[59]); - - if (unlikely(tmp_called_name_4 == NULL)) { - tmp_called_name_4 = GET_MODULE_VARIABLE_VALUE_FALLBACK(mod_consts[59]); - } - - if (tmp_called_name_4 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 327; - type_description_1 = "oooooooo"; - goto frame_exception_exit_1; - } - tmp_dict_key_3 = mod_consts[16]; - CHECK_OBJECT(par_ignore_index); - tmp_dict_value_3 = par_ignore_index; - tmp_kwargs_name_3 = _PyDict_NewPresized( 1 ); - tmp_res = PyDict_SetItem(tmp_kwargs_name_3, tmp_dict_key_3, tmp_dict_value_3); - assert(!(tmp_res != 0)); - frame_48d8d9a1daf8117bcef99d7047b108c4->m_frame.f_lineno = 327; - tmp_return_value = CALL_FUNCTION_WITH_KEYARGS(tmp_called_name_4, tmp_kwargs_name_3); - Py_DECREF(tmp_kwargs_name_3); - if (tmp_return_value == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 327; - type_description_1 = "oooooooo"; - goto frame_exception_exit_1; - } - goto frame_return_exit_1; - } - goto branch_end_5; - branch_no_5:; - { - nuitka_bool tmp_condition_result_7; - PyObject *tmp_compexpr_left_7; - PyObject *tmp_compexpr_right_7; - PyObject *tmp_tmp_condition_result_7_object_1; - int tmp_truth_name_5; - CHECK_OBJECT(par_name); - tmp_compexpr_left_7 = par_name; - tmp_compexpr_right_7 = mod_consts[66]; - tmp_tmp_condition_result_7_object_1 = RICH_COMPARE_EQ_OBJECT_OBJECT_OBJECT(tmp_compexpr_left_7, tmp_compexpr_right_7); - if (tmp_tmp_condition_result_7_object_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 328; - type_description_1 = "oooooooo"; - goto frame_exception_exit_1; - } - tmp_truth_name_5 = CHECK_IF_TRUE(tmp_tmp_condition_result_7_object_1); - if (tmp_truth_name_5 == -1) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - Py_DECREF(tmp_tmp_condition_result_7_object_1); - - exception_lineno = 328; - type_description_1 = "oooooooo"; - goto frame_exception_exit_1; - } - tmp_condition_result_7 = tmp_truth_name_5 == 0 ? NUITKA_BOOL_FALSE : NUITKA_BOOL_TRUE; - Py_DECREF(tmp_tmp_condition_result_7_object_1); - if (tmp_condition_result_7 == NUITKA_BOOL_TRUE) { - goto branch_yes_7; - } else { - goto branch_no_7; - } - } - branch_yes_7:; - { - PyObject *tmp_called_name_5; - PyObject *tmp_kwargs_name_4; - PyObject *tmp_dict_key_4; - PyObject *tmp_dict_value_4; - tmp_called_name_5 = GET_STRING_DICT_VALUE(moduledict_models$unet3d$losses, (Nuitka_StringObject *)mod_consts[66]); - - if (unlikely(tmp_called_name_5 == NULL)) { - tmp_called_name_5 = GET_MODULE_VARIABLE_VALUE_FALLBACK(mod_consts[66]); - } - - if (tmp_called_name_5 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 329; - type_description_1 = "oooooooo"; - goto frame_exception_exit_1; - } - tmp_dict_key_4 = mod_consts[67]; - CHECK_OBJECT(par_weight); - tmp_dict_value_4 = par_weight; - tmp_kwargs_name_4 = _PyDict_NewPresized( 2 ); - tmp_res = PyDict_SetItem(tmp_kwargs_name_4, tmp_dict_key_4, tmp_dict_value_4); - assert(!(tmp_res != 0)); - tmp_dict_key_4 = mod_consts[16]; - CHECK_OBJECT(par_ignore_index); - tmp_dict_value_4 = par_ignore_index; - tmp_res = PyDict_SetItem(tmp_kwargs_name_4, tmp_dict_key_4, tmp_dict_value_4); - assert(!(tmp_res != 0)); - frame_48d8d9a1daf8117bcef99d7047b108c4->m_frame.f_lineno = 329; - tmp_return_value = CALL_FUNCTION_WITH_KEYARGS(tmp_called_name_5, tmp_kwargs_name_4); - Py_DECREF(tmp_kwargs_name_4); - if (tmp_return_value == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 329; - type_description_1 = "oooooooo"; - goto frame_exception_exit_1; - } - goto frame_return_exit_1; - } - goto branch_end_7; - branch_no_7:; - { - nuitka_bool tmp_condition_result_8; - PyObject *tmp_compexpr_left_8; - PyObject *tmp_compexpr_right_8; - PyObject *tmp_tmp_condition_result_8_object_1; - int tmp_truth_name_6; - CHECK_OBJECT(par_name); - tmp_compexpr_left_8 = par_name; - tmp_compexpr_right_8 = mod_consts[110]; - tmp_tmp_condition_result_8_object_1 = RICH_COMPARE_EQ_OBJECT_OBJECT_OBJECT(tmp_compexpr_left_8, tmp_compexpr_right_8); - if (tmp_tmp_condition_result_8_object_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 330; - type_description_1 = "oooooooo"; - goto frame_exception_exit_1; - } - tmp_truth_name_6 = CHECK_IF_TRUE(tmp_tmp_condition_result_8_object_1); - if (tmp_truth_name_6 == -1) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - Py_DECREF(tmp_tmp_condition_result_8_object_1); - - exception_lineno = 330; - type_description_1 = "oooooooo"; - goto frame_exception_exit_1; - } - tmp_condition_result_8 = tmp_truth_name_6 == 0 ? NUITKA_BOOL_FALSE : NUITKA_BOOL_TRUE; - Py_DECREF(tmp_tmp_condition_result_8_object_1); - if (tmp_condition_result_8 == NUITKA_BOOL_TRUE) { - goto branch_yes_8; - } else { - goto branch_no_8; - } - } - branch_yes_8:; - { - PyObject *tmp_assign_source_5; - PyObject *tmp_called_instance_3; - CHECK_OBJECT(par_loss_config); - tmp_called_instance_3 = par_loss_config; - frame_48d8d9a1daf8117bcef99d7047b108c4->m_frame.f_lineno = 331; - tmp_assign_source_5 = CALL_METHOD_WITH_ARGS2( - tmp_called_instance_3, - mod_consts[101], - &PyTuple_GET_ITEM(mod_consts[111], 0) - ); - - if (tmp_assign_source_5 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 331; - type_description_1 = "oooooooo"; - goto frame_exception_exit_1; - } - assert(var_normalization == NULL); - var_normalization = tmp_assign_source_5; - } - { - PyObject *tmp_called_name_6; - PyObject *tmp_kwargs_name_5; - PyObject *tmp_dict_key_5; - PyObject *tmp_dict_value_5; - tmp_called_name_6 = GET_STRING_DICT_VALUE(moduledict_models$unet3d$losses, (Nuitka_StringObject *)mod_consts[110]); - - if (unlikely(tmp_called_name_6 == NULL)) { - tmp_called_name_6 = GET_MODULE_VARIABLE_VALUE_FALLBACK(mod_consts[110]); - } - - if (tmp_called_name_6 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 332; - type_description_1 = "oooooooo"; - goto frame_exception_exit_1; - } - tmp_dict_key_5 = mod_consts[38]; - CHECK_OBJECT(var_normalization); - tmp_dict_value_5 = var_normalization; - tmp_kwargs_name_5 = _PyDict_NewPresized( 1 ); - tmp_res = PyDict_SetItem(tmp_kwargs_name_5, tmp_dict_key_5, tmp_dict_value_5); - assert(!(tmp_res != 0)); - frame_48d8d9a1daf8117bcef99d7047b108c4->m_frame.f_lineno = 332; - tmp_return_value = CALL_FUNCTION_WITH_KEYARGS(tmp_called_name_6, tmp_kwargs_name_5); - Py_DECREF(tmp_kwargs_name_5); - if (tmp_return_value == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 332; - type_description_1 = "oooooooo"; - goto frame_exception_exit_1; - } - goto frame_return_exit_1; - } - goto branch_end_8; - branch_no_8:; - { - nuitka_bool tmp_condition_result_9; - PyObject *tmp_compexpr_left_9; - PyObject *tmp_compexpr_right_9; - PyObject *tmp_tmp_condition_result_9_object_1; - int tmp_truth_name_7; - CHECK_OBJECT(par_name); - tmp_compexpr_left_9 = par_name; - tmp_compexpr_right_9 = mod_consts[58]; - tmp_tmp_condition_result_9_object_1 = RICH_COMPARE_EQ_OBJECT_OBJECT_OBJECT(tmp_compexpr_left_9, tmp_compexpr_right_9); - if (tmp_tmp_condition_result_9_object_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 333; - type_description_1 = "oooooooo"; - goto frame_exception_exit_1; - } - tmp_truth_name_7 = CHECK_IF_TRUE(tmp_tmp_condition_result_9_object_1); - if (tmp_truth_name_7 == -1) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - Py_DECREF(tmp_tmp_condition_result_9_object_1); - - exception_lineno = 333; - type_description_1 = "oooooooo"; - goto frame_exception_exit_1; - } - tmp_condition_result_9 = tmp_truth_name_7 == 0 ? NUITKA_BOOL_FALSE : NUITKA_BOOL_TRUE; - Py_DECREF(tmp_tmp_condition_result_9_object_1); - if (tmp_condition_result_9 == NUITKA_BOOL_TRUE) { - goto branch_yes_9; - } else { - goto branch_no_9; - } - } - branch_yes_9:; - { - PyObject *tmp_assign_source_6; - PyObject *tmp_called_instance_4; - CHECK_OBJECT(par_loss_config); - tmp_called_instance_4 = par_loss_config; - frame_48d8d9a1daf8117bcef99d7047b108c4->m_frame.f_lineno = 334; - tmp_assign_source_6 = CALL_METHOD_WITH_ARGS2( - tmp_called_instance_4, - mod_consts[101], - &PyTuple_GET_ITEM(mod_consts[111], 0) - ); - - if (tmp_assign_source_6 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 334; - type_description_1 = "oooooooo"; - goto frame_exception_exit_1; - } - assert(var_normalization == NULL); - var_normalization = tmp_assign_source_6; - } - { - PyObject *tmp_called_name_7; - PyObject *tmp_kwargs_name_6; - PyObject *tmp_dict_key_6; - PyObject *tmp_dict_value_6; - tmp_called_name_7 = GET_STRING_DICT_VALUE(moduledict_models$unet3d$losses, (Nuitka_StringObject *)mod_consts[58]); - - if (unlikely(tmp_called_name_7 == NULL)) { - tmp_called_name_7 = GET_MODULE_VARIABLE_VALUE_FALLBACK(mod_consts[58]); - } - - if (tmp_called_name_7 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 335; - type_description_1 = "oooooooo"; - goto frame_exception_exit_1; - } - tmp_dict_key_6 = mod_consts[33]; - CHECK_OBJECT(par_weight); - tmp_dict_value_6 = par_weight; - tmp_kwargs_name_6 = _PyDict_NewPresized( 2 ); - tmp_res = PyDict_SetItem(tmp_kwargs_name_6, tmp_dict_key_6, tmp_dict_value_6); - assert(!(tmp_res != 0)); - tmp_dict_key_6 = mod_consts[38]; - CHECK_OBJECT(var_normalization); - tmp_dict_value_6 = var_normalization; - tmp_res = PyDict_SetItem(tmp_kwargs_name_6, tmp_dict_key_6, tmp_dict_value_6); - assert(!(tmp_res != 0)); - frame_48d8d9a1daf8117bcef99d7047b108c4->m_frame.f_lineno = 335; - tmp_return_value = CALL_FUNCTION_WITH_KEYARGS(tmp_called_name_7, tmp_kwargs_name_6); - Py_DECREF(tmp_kwargs_name_6); - if (tmp_return_value == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 335; - type_description_1 = "oooooooo"; - goto frame_exception_exit_1; - } - goto frame_return_exit_1; - } - goto branch_end_9; - branch_no_9:; - { - nuitka_bool tmp_condition_result_10; - PyObject *tmp_compexpr_left_10; - PyObject *tmp_compexpr_right_10; - PyObject *tmp_tmp_condition_result_10_object_1; - int tmp_truth_name_8; - CHECK_OBJECT(par_name); - tmp_compexpr_left_10 = par_name; - tmp_compexpr_right_10 = mod_consts[112]; - tmp_tmp_condition_result_10_object_1 = RICH_COMPARE_EQ_OBJECT_OBJECT_OBJECT(tmp_compexpr_left_10, tmp_compexpr_right_10); - if (tmp_tmp_condition_result_10_object_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 336; - type_description_1 = "oooooooo"; - goto frame_exception_exit_1; - } - tmp_truth_name_8 = CHECK_IF_TRUE(tmp_tmp_condition_result_10_object_1); - if (tmp_truth_name_8 == -1) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - Py_DECREF(tmp_tmp_condition_result_10_object_1); - - exception_lineno = 336; - type_description_1 = "oooooooo"; - goto frame_exception_exit_1; - } - tmp_condition_result_10 = tmp_truth_name_8 == 0 ? NUITKA_BOOL_FALSE : NUITKA_BOOL_TRUE; - Py_DECREF(tmp_tmp_condition_result_10_object_1); - if (tmp_condition_result_10 == NUITKA_BOOL_TRUE) { - goto branch_yes_10; - } else { - goto branch_no_10; - } - } - branch_yes_10:; - { - PyObject *tmp_called_name_8; - tmp_called_name_8 = GET_STRING_DICT_VALUE(moduledict_models$unet3d$losses, (Nuitka_StringObject *)mod_consts[112]); - - if (unlikely(tmp_called_name_8 == NULL)) { - tmp_called_name_8 = GET_MODULE_VARIABLE_VALUE_FALLBACK(mod_consts[112]); - } - - if (tmp_called_name_8 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 337; - type_description_1 = "oooooooo"; - goto frame_exception_exit_1; - } - frame_48d8d9a1daf8117bcef99d7047b108c4->m_frame.f_lineno = 337; - tmp_return_value = CALL_FUNCTION_NO_ARGS(tmp_called_name_8); - if (tmp_return_value == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 337; - type_description_1 = "oooooooo"; - goto frame_exception_exit_1; - } - goto frame_return_exit_1; - } - goto branch_end_10; - branch_no_10:; - { - nuitka_bool tmp_condition_result_11; - PyObject *tmp_compexpr_left_11; - PyObject *tmp_compexpr_right_11; - PyObject *tmp_tmp_condition_result_11_object_1; - int tmp_truth_name_9; - CHECK_OBJECT(par_name); - tmp_compexpr_left_11 = par_name; - tmp_compexpr_right_11 = mod_consts[113]; - tmp_tmp_condition_result_11_object_1 = RICH_COMPARE_EQ_OBJECT_OBJECT_OBJECT(tmp_compexpr_left_11, tmp_compexpr_right_11); - if (tmp_tmp_condition_result_11_object_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 338; - type_description_1 = "oooooooo"; - goto frame_exception_exit_1; - } - tmp_truth_name_9 = CHECK_IF_TRUE(tmp_tmp_condition_result_11_object_1); - if (tmp_truth_name_9 == -1) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - Py_DECREF(tmp_tmp_condition_result_11_object_1); - - exception_lineno = 338; - type_description_1 = "oooooooo"; - goto frame_exception_exit_1; - } - tmp_condition_result_11 = tmp_truth_name_9 == 0 ? NUITKA_BOOL_FALSE : NUITKA_BOOL_TRUE; - Py_DECREF(tmp_tmp_condition_result_11_object_1); - if (tmp_condition_result_11 == NUITKA_BOOL_TRUE) { - goto branch_yes_11; - } else { - goto branch_no_11; - } - } - branch_yes_11:; - { - PyObject *tmp_called_name_9; - tmp_called_name_9 = GET_STRING_DICT_VALUE(moduledict_models$unet3d$losses, (Nuitka_StringObject *)mod_consts[113]); - - if (unlikely(tmp_called_name_9 == NULL)) { - tmp_called_name_9 = GET_MODULE_VARIABLE_VALUE_FALLBACK(mod_consts[113]); - } - - if (tmp_called_name_9 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 339; - type_description_1 = "oooooooo"; - goto frame_exception_exit_1; - } - frame_48d8d9a1daf8117bcef99d7047b108c4->m_frame.f_lineno = 339; - tmp_return_value = CALL_FUNCTION_NO_ARGS(tmp_called_name_9); - if (tmp_return_value == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 339; - type_description_1 = "oooooooo"; - goto frame_exception_exit_1; - } - goto frame_return_exit_1; - } - goto branch_end_11; - branch_no_11:; - { - nuitka_bool tmp_condition_result_12; - PyObject *tmp_compexpr_left_12; - PyObject *tmp_compexpr_right_12; - PyObject *tmp_tmp_condition_result_12_object_1; - int tmp_truth_name_10; - CHECK_OBJECT(par_name); - tmp_compexpr_left_12 = par_name; - tmp_compexpr_right_12 = mod_consts[114]; - tmp_tmp_condition_result_12_object_1 = RICH_COMPARE_EQ_OBJECT_OBJECT_OBJECT(tmp_compexpr_left_12, tmp_compexpr_right_12); - if (tmp_tmp_condition_result_12_object_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 340; - type_description_1 = "oooooooo"; - goto frame_exception_exit_1; - } - tmp_truth_name_10 = CHECK_IF_TRUE(tmp_tmp_condition_result_12_object_1); - if (tmp_truth_name_10 == -1) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - Py_DECREF(tmp_tmp_condition_result_12_object_1); - - exception_lineno = 340; - type_description_1 = "oooooooo"; - goto frame_exception_exit_1; - } - tmp_condition_result_12 = tmp_truth_name_10 == 0 ? NUITKA_BOOL_FALSE : NUITKA_BOOL_TRUE; - Py_DECREF(tmp_tmp_condition_result_12_object_1); - if (tmp_condition_result_12 == NUITKA_BOOL_TRUE) { - goto branch_yes_12; - } else { - goto branch_no_12; - } - } - branch_yes_12:; - { - PyObject *tmp_called_name_10; - tmp_called_name_10 = GET_STRING_DICT_VALUE(moduledict_models$unet3d$losses, (Nuitka_StringObject *)mod_consts[114]); - - if (unlikely(tmp_called_name_10 == NULL)) { - tmp_called_name_10 = GET_MODULE_VARIABLE_VALUE_FALLBACK(mod_consts[114]); - } - - if (tmp_called_name_10 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 341; - type_description_1 = "oooooooo"; - goto frame_exception_exit_1; - } - frame_48d8d9a1daf8117bcef99d7047b108c4->m_frame.f_lineno = 341; - tmp_return_value = CALL_FUNCTION_NO_ARGS(tmp_called_name_10); - if (tmp_return_value == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 341; - type_description_1 = "oooooooo"; - goto frame_exception_exit_1; - } - goto frame_return_exit_1; - } - goto branch_end_12; - branch_no_12:; - { - nuitka_bool tmp_condition_result_13; - PyObject *tmp_compexpr_left_13; - PyObject *tmp_compexpr_right_13; - PyObject *tmp_tmp_condition_result_13_object_1; - int tmp_truth_name_11; - CHECK_OBJECT(par_name); - tmp_compexpr_left_13 = par_name; - tmp_compexpr_right_13 = mod_consts[115]; - tmp_tmp_condition_result_13_object_1 = RICH_COMPARE_EQ_OBJECT_OBJECT_OBJECT(tmp_compexpr_left_13, tmp_compexpr_right_13); - if (tmp_tmp_condition_result_13_object_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 342; - type_description_1 = "oooooooo"; - goto frame_exception_exit_1; - } - tmp_truth_name_11 = CHECK_IF_TRUE(tmp_tmp_condition_result_13_object_1); - if (tmp_truth_name_11 == -1) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - Py_DECREF(tmp_tmp_condition_result_13_object_1); - - exception_lineno = 342; - type_description_1 = "oooooooo"; - goto frame_exception_exit_1; - } - tmp_condition_result_13 = tmp_truth_name_11 == 0 ? NUITKA_BOOL_FALSE : NUITKA_BOOL_TRUE; - Py_DECREF(tmp_tmp_condition_result_13_object_1); - if (tmp_condition_result_13 == NUITKA_BOOL_TRUE) { - goto branch_yes_13; - } else { - goto branch_no_13; - } - } - branch_yes_13:; - { - PyObject *tmp_called_name_11; - PyObject *tmp_kwargs_name_7; - PyObject *tmp_dict_key_7; - PyObject *tmp_dict_value_7; - PyObject *tmp_expression_name_3; - PyObject *tmp_subscript_name_1; - tmp_called_name_11 = GET_STRING_DICT_VALUE(moduledict_models$unet3d$losses, (Nuitka_StringObject *)mod_consts[115]); - - if (unlikely(tmp_called_name_11 == NULL)) { - tmp_called_name_11 = GET_MODULE_VARIABLE_VALUE_FALLBACK(mod_consts[115]); - } - - if (tmp_called_name_11 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 343; - type_description_1 = "oooooooo"; - goto frame_exception_exit_1; - } - tmp_dict_key_7 = mod_consts[80]; - CHECK_OBJECT(par_loss_config); - tmp_expression_name_3 = par_loss_config; - tmp_subscript_name_1 = mod_consts[80]; - tmp_dict_value_7 = LOOKUP_SUBSCRIPT(tmp_expression_name_3, tmp_subscript_name_1); - if (tmp_dict_value_7 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 343; - type_description_1 = "oooooooo"; - goto frame_exception_exit_1; - } - tmp_kwargs_name_7 = _PyDict_NewPresized( 3 ); - { - PyObject *tmp_expression_name_4; - PyObject *tmp_subscript_name_2; - PyObject *tmp_called_instance_5; - tmp_res = PyDict_SetItem(tmp_kwargs_name_7, tmp_dict_key_7, tmp_dict_value_7); - Py_DECREF(tmp_dict_value_7); - assert(!(tmp_res != 0)); - tmp_dict_key_7 = mod_consts[116]; - CHECK_OBJECT(par_loss_config); - tmp_expression_name_4 = par_loss_config; - tmp_subscript_name_2 = mod_consts[116]; - tmp_dict_value_7 = LOOKUP_SUBSCRIPT(tmp_expression_name_4, tmp_subscript_name_2); - if (tmp_dict_value_7 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 344; - type_description_1 = "oooooooo"; - goto dict_build_exception_1; - } - tmp_res = PyDict_SetItem(tmp_kwargs_name_7, tmp_dict_key_7, tmp_dict_value_7); - Py_DECREF(tmp_dict_value_7); - assert(!(tmp_res != 0)); - tmp_dict_key_7 = mod_consts[81]; - CHECK_OBJECT(par_loss_config); - tmp_called_instance_5 = par_loss_config; - frame_48d8d9a1daf8117bcef99d7047b108c4->m_frame.f_lineno = 345; - tmp_dict_value_7 = CALL_METHOD_WITH_ARGS2( - tmp_called_instance_5, - mod_consts[101], - &PyTuple_GET_ITEM(mod_consts[117], 0) - ); - - if (tmp_dict_value_7 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 345; - type_description_1 = "oooooooo"; - goto dict_build_exception_1; - } - tmp_res = PyDict_SetItem(tmp_kwargs_name_7, tmp_dict_key_7, tmp_dict_value_7); - Py_DECREF(tmp_dict_value_7); - assert(!(tmp_res != 0)); - } - goto dict_build_noexception_1; - // Exception handling pass through code for dict_build: - dict_build_exception_1:; - Py_DECREF(tmp_kwargs_name_7); - goto frame_exception_exit_1; - // Finished with no exception for dict_build: - dict_build_noexception_1:; - frame_48d8d9a1daf8117bcef99d7047b108c4->m_frame.f_lineno = 343; - tmp_return_value = CALL_FUNCTION_WITH_KEYARGS(tmp_called_name_11, tmp_kwargs_name_7); - Py_DECREF(tmp_kwargs_name_7); - if (tmp_return_value == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 343; - type_description_1 = "oooooooo"; - goto frame_exception_exit_1; - } - goto frame_return_exit_1; - } - goto branch_end_13; - branch_no_13:; - { - PyObject *tmp_raise_type_1; - PyObject *tmp_make_exception_arg_1; - PyObject *tmp_string_concat_values_1; - PyObject *tmp_tuple_element_1; - tmp_tuple_element_1 = mod_consts[118]; - tmp_string_concat_values_1 = PyTuple_New(3); - { - PyObject *tmp_format_value_1; - PyObject *tmp_format_spec_1; - PyTuple_SET_ITEM0(tmp_string_concat_values_1, 0, tmp_tuple_element_1); - CHECK_OBJECT(par_name); - tmp_format_value_1 = par_name; - tmp_format_spec_1 = mod_consts[119]; - tmp_tuple_element_1 = BUILTIN_FORMAT(tmp_format_value_1, tmp_format_spec_1); - if (tmp_tuple_element_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 347; - type_description_1 = "oooooooo"; - goto tuple_build_exception_1; - } - PyTuple_SET_ITEM(tmp_string_concat_values_1, 1, tmp_tuple_element_1); - tmp_tuple_element_1 = mod_consts[120]; - PyTuple_SET_ITEM0(tmp_string_concat_values_1, 2, tmp_tuple_element_1); - } - goto tuple_build_noexception_1; - // Exception handling pass through code for tuple_build: - tuple_build_exception_1:; - Py_DECREF(tmp_string_concat_values_1); - goto frame_exception_exit_1; - // Finished with no exception for tuple_build: - tuple_build_noexception_1:; - tmp_make_exception_arg_1 = PyUnicode_Join(mod_consts[119], tmp_string_concat_values_1); - Py_DECREF(tmp_string_concat_values_1); - if (tmp_make_exception_arg_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 347; - type_description_1 = "oooooooo"; - goto frame_exception_exit_1; - } - frame_48d8d9a1daf8117bcef99d7047b108c4->m_frame.f_lineno = 347; - tmp_raise_type_1 = CALL_FUNCTION_WITH_SINGLE_ARG(PyExc_RuntimeError, tmp_make_exception_arg_1); - Py_DECREF(tmp_make_exception_arg_1); - assert(!(tmp_raise_type_1 == NULL)); - exception_type = tmp_raise_type_1; - exception_lineno = 347; - RAISE_EXCEPTION_WITH_TYPE(&exception_type, &exception_value, &exception_tb); - type_description_1 = "oooooooo"; - goto frame_exception_exit_1; - } - branch_end_13:; - branch_end_12:; - branch_end_11:; - branch_end_10:; - branch_end_9:; - branch_end_8:; - branch_end_7:; - branch_end_5:; - branch_end_3:; - branch_end_2:; - branch_end_1:; - -#if 0 - RESTORE_FRAME_EXCEPTION(frame_48d8d9a1daf8117bcef99d7047b108c4); -#endif - - // Put the previous frame back on top. - popFrameStack(); - - goto frame_no_exception_1; - - frame_return_exit_1:; -#if 0 - RESTORE_FRAME_EXCEPTION(frame_48d8d9a1daf8117bcef99d7047b108c4); -#endif - - // Put the previous frame back on top. - popFrameStack(); - - goto try_return_handler_1; - - frame_exception_exit_1:; - -#if 0 - RESTORE_FRAME_EXCEPTION(frame_48d8d9a1daf8117bcef99d7047b108c4); -#endif - - if (exception_tb == NULL) { - exception_tb = MAKE_TRACEBACK(frame_48d8d9a1daf8117bcef99d7047b108c4, exception_lineno); - } else if (exception_tb->tb_frame != &frame_48d8d9a1daf8117bcef99d7047b108c4->m_frame) { - exception_tb = ADD_TRACEBACK(exception_tb, frame_48d8d9a1daf8117bcef99d7047b108c4, exception_lineno); - } - - // Attaches locals to frame if any. - Nuitka_Frame_AttachLocals( - frame_48d8d9a1daf8117bcef99d7047b108c4, - type_description_1, - par_name, - par_loss_config, - par_weight, - par_ignore_index, - par_pos_weight, - var_alpha, - var_beta, - var_normalization - ); - - - // Release cached frame if used for exception. - if (frame_48d8d9a1daf8117bcef99d7047b108c4 == cache_frame_48d8d9a1daf8117bcef99d7047b108c4) { -#if _DEBUG_REFCOUNTS - count_active_frame_cache_instances -= 1; - count_released_frame_cache_instances += 1; -#endif - - Py_DECREF(cache_frame_48d8d9a1daf8117bcef99d7047b108c4); - cache_frame_48d8d9a1daf8117bcef99d7047b108c4 = NULL; - } - - assertFrameObject(frame_48d8d9a1daf8117bcef99d7047b108c4); - - // Put the previous frame back on top. - popFrameStack(); - - // Return the error. - goto try_except_handler_1; - - frame_no_exception_1:; - NUITKA_CANNOT_GET_HERE("tried codes exits in all cases"); - return NULL; - // Return handler code: - try_return_handler_1:; - CHECK_OBJECT(par_name); - Py_DECREF(par_name); - par_name = NULL; - Py_XDECREF(par_loss_config); - par_loss_config = NULL; - Py_XDECREF(par_weight); - par_weight = NULL; - Py_XDECREF(par_ignore_index); - par_ignore_index = NULL; - Py_XDECREF(par_pos_weight); - par_pos_weight = NULL; - Py_XDECREF(var_alpha); - var_alpha = NULL; - Py_XDECREF(var_beta); - var_beta = NULL; - Py_XDECREF(var_normalization); - var_normalization = NULL; - goto function_return_exit; - // Exception handler code: - try_except_handler_1:; - exception_keeper_type_1 = exception_type; - exception_keeper_value_1 = exception_value; - exception_keeper_tb_1 = exception_tb; - exception_keeper_lineno_1 = exception_lineno; - exception_type = NULL; - exception_value = NULL; - exception_tb = NULL; - exception_lineno = 0; - - CHECK_OBJECT(par_name); - Py_DECREF(par_name); - par_name = NULL; - Py_XDECREF(par_loss_config); - par_loss_config = NULL; - Py_XDECREF(par_weight); - par_weight = NULL; - Py_XDECREF(par_ignore_index); - par_ignore_index = NULL; - Py_XDECREF(par_pos_weight); - par_pos_weight = NULL; - Py_XDECREF(var_alpha); - var_alpha = NULL; - Py_XDECREF(var_beta); - var_beta = NULL; - Py_XDECREF(var_normalization); - var_normalization = NULL; - // Re-raise. - exception_type = exception_keeper_type_1; - exception_value = exception_keeper_value_1; - exception_tb = exception_keeper_tb_1; - exception_lineno = exception_keeper_lineno_1; - - goto function_exception_exit; - // End of try: - - NUITKA_CANNOT_GET_HERE("Return statement must have exited already."); - return NULL; - -function_exception_exit: - assert(exception_type); - RESTORE_ERROR_OCCURRED(exception_type, exception_value, exception_tb); - - return NULL; - -function_return_exit: - // Function cleanup code if any. - - - // Actual function exit with return value, making sure we did not make - // the error status worse despite non-NULL return. - CHECK_OBJECT(tmp_return_value); - assert(had_error || !ERROR_OCCURRED()); - return tmp_return_value; -} - - - -static PyObject *MAKE_FUNCTION_models$unet3d$losses$$$function__10_dice() { - struct Nuitka_FunctionObject *result = Nuitka_Function_New( - impl_models$unet3d$losses$$$function__10_dice, - mod_consts[43], -#if PYTHON_VERSION >= 0x300 - mod_consts[162], -#endif - codeobj_7138dc343b9d36f61ecf5068b1d4a9e2, - NULL, -#if PYTHON_VERSION >= 0x300 - NULL, - NULL, -#endif - module_models$unet3d$losses, - NULL, - NULL, - 0 - ); - - - return (PyObject *)result; -} - - - -static PyObject *MAKE_FUNCTION_models$unet3d$losses$$$function__11___init__(PyObject *defaults, struct Nuitka_CellObject **closure) { - struct Nuitka_FunctionObject *result = Nuitka_Function_New( - impl_models$unet3d$losses$$$function__11___init__, - mod_consts[13], -#if PYTHON_VERSION >= 0x300 - mod_consts[165], -#endif - codeobj_689fefa3b59b704f733760f36572546b, - defaults, -#if PYTHON_VERSION >= 0x300 - NULL, - NULL, -#endif - module_models$unet3d$losses, - NULL, - closure, - 1 - ); - - - return (PyObject *)result; -} - - - -static PyObject *MAKE_FUNCTION_models$unet3d$losses$$$function__12_dice() { - struct Nuitka_FunctionObject *result = Nuitka_Function_New( - impl_models$unet3d$losses$$$function__12_dice, - mod_consts[43], -#if PYTHON_VERSION >= 0x300 - mod_consts[166], -#endif - codeobj_d8de5593120711397ebcd544a9a5beee, - NULL, -#if PYTHON_VERSION >= 0x300 - NULL, - NULL, -#endif - module_models$unet3d$losses, - NULL, - NULL, - 0 - ); - - - return (PyObject *)result; -} - - - -static PyObject *MAKE_FUNCTION_models$unet3d$losses$$$function__13___init__() { - struct Nuitka_FunctionObject *result = Nuitka_Function_New( - impl_models$unet3d$losses$$$function__13___init__, - mod_consts[13], -#if PYTHON_VERSION >= 0x300 - mod_consts[168], -#endif - codeobj_619124ae3c7c6b52dec6da317ecfa60b, - NULL, -#if PYTHON_VERSION >= 0x300 - NULL, - NULL, -#endif - module_models$unet3d$losses, - NULL, - NULL, - 0 - ); - - - return (PyObject *)result; -} - - - -static PyObject *MAKE_FUNCTION_models$unet3d$losses$$$function__14_forward() { - struct Nuitka_FunctionObject *result = Nuitka_Function_New( - impl_models$unet3d$losses$$$function__14_forward, - mod_consts[82], -#if PYTHON_VERSION >= 0x300 - mod_consts[169], -#endif - codeobj_3a3c4357c3d422694cae78ba51b909d4, - NULL, -#if PYTHON_VERSION >= 0x300 - NULL, - NULL, -#endif - module_models$unet3d$losses, - NULL, - NULL, - 0 - ); - - - return (PyObject *)result; -} - - - -static PyObject *MAKE_FUNCTION_models$unet3d$losses$$$function__15___init__(PyObject *defaults) { - struct Nuitka_FunctionObject *result = Nuitka_Function_New( - impl_models$unet3d$losses$$$function__15___init__, - mod_consts[13], -#if PYTHON_VERSION >= 0x300 - mod_consts[171], -#endif - codeobj_45f52b2af41ae9eeda8b8dceada0ce54, - defaults, -#if PYTHON_VERSION >= 0x300 - NULL, - NULL, -#endif - module_models$unet3d$losses, - NULL, - NULL, - 0 - ); - - - return (PyObject *)result; -} - - - -static PyObject *MAKE_FUNCTION_models$unet3d$losses$$$function__16_forward() { - struct Nuitka_FunctionObject *result = Nuitka_Function_New( - impl_models$unet3d$losses$$$function__16_forward, - mod_consts[82], -#if PYTHON_VERSION >= 0x300 - mod_consts[172], -#endif - codeobj_d0a908219576feca58e31d68600ccb1c, - NULL, -#if PYTHON_VERSION >= 0x300 - NULL, - NULL, -#endif - module_models$unet3d$losses, - NULL, - NULL, - 0 - ); - - - return (PyObject *)result; -} - - - -static PyObject *MAKE_FUNCTION_models$unet3d$losses$$$function__17__class_weights() { - struct Nuitka_FunctionObject *result = Nuitka_Function_New( - impl_models$unet3d$losses$$$function__17__class_weights, - mod_consts[60], -#if PYTHON_VERSION >= 0x300 - mod_consts[174], -#endif - codeobj_c60e6b0b6cbf537f64facb5040a84769, - NULL, -#if PYTHON_VERSION >= 0x300 - NULL, - NULL, -#endif - module_models$unet3d$losses, - NULL, - NULL, - 0 - ); - - - return (PyObject *)result; -} - - - -static PyObject *MAKE_FUNCTION_models$unet3d$losses$$$function__18___init__(PyObject *defaults) { - struct Nuitka_FunctionObject *result = Nuitka_Function_New( - impl_models$unet3d$losses$$$function__18___init__, - mod_consts[13], -#if PYTHON_VERSION >= 0x300 - mod_consts[176], -#endif - codeobj_f0147916ca8a0f188f736d2445a24142, - defaults, -#if PYTHON_VERSION >= 0x300 - NULL, - NULL, -#endif - module_models$unet3d$losses, - NULL, - NULL, - 0 - ); - - - return (PyObject *)result; -} - - - -static PyObject *MAKE_FUNCTION_models$unet3d$losses$$$function__19_forward() { - struct Nuitka_FunctionObject *result = Nuitka_Function_New( - impl_models$unet3d$losses$$$function__19_forward, - mod_consts[82], -#if PYTHON_VERSION >= 0x300 - mod_consts[177], -#endif - codeobj_ca8b7a4c8713e1d10286835f390e025f, - NULL, -#if PYTHON_VERSION >= 0x300 - NULL, - NULL, -#endif - module_models$unet3d$losses, - NULL, - NULL, - 0 - ); - - - return (PyObject *)result; -} - - - -static PyObject *MAKE_FUNCTION_models$unet3d$losses$$$function__1_compute_per_channel_dice(PyObject *defaults) { - struct Nuitka_FunctionObject *result = Nuitka_Function_New( - impl_models$unet3d$losses$$$function__1_compute_per_channel_dice, - mod_consts[47], -#if PYTHON_VERSION >= 0x300 - NULL, -#endif - codeobj_ad5336bf04811a8c76dcc0c2c51b6074, - defaults, -#if PYTHON_VERSION >= 0x300 - NULL, - NULL, -#endif - module_models$unet3d$losses, - mod_consts[11], - NULL, - 0 - ); - - - return (PyObject *)result; -} - - - -static PyObject *MAKE_FUNCTION_models$unet3d$losses$$$function__20___init__(PyObject *defaults, struct Nuitka_CellObject **closure) { - struct Nuitka_FunctionObject *result = Nuitka_Function_New( - impl_models$unet3d$losses$$$function__20___init__, - mod_consts[13], -#if PYTHON_VERSION >= 0x300 - mod_consts[179], -#endif - codeobj_915a2da7d900624b990aa096cbb70b79, - defaults, -#if PYTHON_VERSION >= 0x300 - NULL, - NULL, -#endif - module_models$unet3d$losses, - NULL, - closure, - 1 - ); - - - return (PyObject *)result; -} - - - -static PyObject *MAKE_FUNCTION_models$unet3d$losses$$$function__21_forward(struct Nuitka_CellObject **closure) { - struct Nuitka_FunctionObject *result = Nuitka_Function_New( - impl_models$unet3d$losses$$$function__21_forward, - mod_consts[82], -#if PYTHON_VERSION >= 0x300 - mod_consts[180], -#endif - codeobj_ce55a77527b8cae9d98b409844d8d681, - NULL, -#if PYTHON_VERSION >= 0x300 - NULL, - NULL, -#endif - module_models$unet3d$losses, - NULL, - closure, - 1 - ); - - - return (PyObject *)result; -} - - - -static PyObject *MAKE_FUNCTION_models$unet3d$losses$$$function__22_flatten() { - struct Nuitka_FunctionObject *result = Nuitka_Function_New( - impl_models$unet3d$losses$$$function__22_flatten, - mod_consts[2], -#if PYTHON_VERSION >= 0x300 - NULL, -#endif - codeobj_0201c31e1e7feff6304044e6d3951db4, - NULL, -#if PYTHON_VERSION >= 0x300 - NULL, - NULL, -#endif - module_models$unet3d$losses, - mod_consts[90], - NULL, - 0 - ); - - - return (PyObject *)result; -} - - - -static PyObject *MAKE_FUNCTION_models$unet3d$losses$$$function__23_get_loss_criterion() { - struct Nuitka_FunctionObject *result = Nuitka_Function_New( - impl_models$unet3d$losses$$$function__23_get_loss_criterion, - mod_consts[181], -#if PYTHON_VERSION >= 0x300 - NULL, -#endif - codeobj_4f67554983fc1bad95f8404ef1c044ec, - NULL, -#if PYTHON_VERSION >= 0x300 - NULL, - NULL, -#endif - module_models$unet3d$losses, - mod_consts[104], - NULL, - 0 - ); - - - return (PyObject *)result; -} - - - -static PyObject *MAKE_FUNCTION_models$unet3d$losses$$$function__24__create_loss() { - struct Nuitka_FunctionObject *result = Nuitka_Function_New( - impl_models$unet3d$losses$$$function__24__create_loss, - mod_consts[99], -#if PYTHON_VERSION >= 0x300 - NULL, -#endif - codeobj_48d8d9a1daf8117bcef99d7047b108c4, - NULL, -#if PYTHON_VERSION >= 0x300 - NULL, - NULL, -#endif - module_models$unet3d$losses, - NULL, - NULL, - 0 - ); - - - return (PyObject *)result; -} - - - -static PyObject *MAKE_FUNCTION_models$unet3d$losses$$$function__2___init__() { - struct Nuitka_FunctionObject *result = Nuitka_Function_New( - impl_models$unet3d$losses$$$function__2___init__, - mod_consts[13], -#if PYTHON_VERSION >= 0x300 - mod_consts[148], -#endif - codeobj_4eb47512d57f9eb20a1993d6d1c3fb78, - NULL, -#if PYTHON_VERSION >= 0x300 - NULL, - NULL, -#endif - module_models$unet3d$losses, - NULL, - NULL, - 0 - ); - - - return (PyObject *)result; -} - - - -static PyObject *MAKE_FUNCTION_models$unet3d$losses$$$function__3_forward() { - struct Nuitka_FunctionObject *result = Nuitka_Function_New( - impl_models$unet3d$losses$$$function__3_forward, - mod_consts[82], -#if PYTHON_VERSION >= 0x300 - mod_consts[149], -#endif - codeobj_7e600e5abd5b883d8c3faab8d6f2a207, - NULL, -#if PYTHON_VERSION >= 0x300 - NULL, - NULL, -#endif - module_models$unet3d$losses, - NULL, - NULL, - 0 - ); - - - return (PyObject *)result; -} - - - -static PyObject *MAKE_FUNCTION_models$unet3d$losses$$$function__4___init__(PyObject *defaults) { - struct Nuitka_FunctionObject *result = Nuitka_Function_New( - impl_models$unet3d$losses$$$function__4___init__, - mod_consts[13], -#if PYTHON_VERSION >= 0x300 - mod_consts[153], -#endif - codeobj_7fca07fbabf40b9aedb62b82b03ac314, - defaults, -#if PYTHON_VERSION >= 0x300 - NULL, - NULL, -#endif - module_models$unet3d$losses, - NULL, - NULL, - 0 - ); - - - return (PyObject *)result; -} - - - -static PyObject *MAKE_FUNCTION_models$unet3d$losses$$$function__5_forward() { - struct Nuitka_FunctionObject *result = Nuitka_Function_New( - impl_models$unet3d$losses$$$function__5_forward, - mod_consts[82], -#if PYTHON_VERSION >= 0x300 - mod_consts[154], -#endif - codeobj_df030e46b619f2e1d7bbe1bf22d15c8c, - NULL, -#if PYTHON_VERSION >= 0x300 - NULL, - NULL, -#endif - module_models$unet3d$losses, - NULL, - NULL, - 0 - ); - - - return (PyObject *)result; -} - - - -static PyObject *MAKE_FUNCTION_models$unet3d$losses$$$function__6___init__(PyObject *defaults) { - struct Nuitka_FunctionObject *result = Nuitka_Function_New( - impl_models$unet3d$losses$$$function__6___init__, - mod_consts[13], -#if PYTHON_VERSION >= 0x300 - mod_consts[157], -#endif - codeobj_967b9bb58a2e42c245494faa4e98659a, - defaults, -#if PYTHON_VERSION >= 0x300 - NULL, - NULL, -#endif - module_models$unet3d$losses, - NULL, - NULL, - 0 - ); - - - return (PyObject *)result; -} - - - -static PyObject *MAKE_FUNCTION_models$unet3d$losses$$$function__6___init__$$$function__1_lambda() { - struct Nuitka_FunctionObject *result = Nuitka_Function_New( - impl_models$unet3d$losses$$$function__6___init__$$$function__1_lambda, - mod_consts[41], -#if PYTHON_VERSION >= 0x300 - mod_consts[42], -#endif - codeobj_bbd4e7afc692945e27dee598a8242d6c, - NULL, -#if PYTHON_VERSION >= 0x300 - NULL, - NULL, -#endif - module_models$unet3d$losses, - NULL, - NULL, - 0 - ); - - - return (PyObject *)result; -} - - - -static PyObject *MAKE_FUNCTION_models$unet3d$losses$$$function__7_dice() { - struct Nuitka_FunctionObject *result = Nuitka_Function_New( - impl_models$unet3d$losses$$$function__7_dice, - mod_consts[43], -#if PYTHON_VERSION >= 0x300 - mod_consts[158], -#endif - codeobj_f96de2d7cdf8118d4114f6e4b5a0cc47, - NULL, -#if PYTHON_VERSION >= 0x300 - NULL, - NULL, -#endif - module_models$unet3d$losses, - NULL, - NULL, - 0 - ); - - - return (PyObject *)result; -} - - - -static PyObject *MAKE_FUNCTION_models$unet3d$losses$$$function__8_forward() { - struct Nuitka_FunctionObject *result = Nuitka_Function_New( - impl_models$unet3d$losses$$$function__8_forward, - mod_consts[82], -#if PYTHON_VERSION >= 0x300 - mod_consts[159], -#endif - codeobj_599f9bc91cca49981a976e3e360b0b63, - NULL, -#if PYTHON_VERSION >= 0x300 - NULL, - NULL, -#endif - module_models$unet3d$losses, - NULL, - NULL, - 0 - ); - - - return (PyObject *)result; -} - - - -static PyObject *MAKE_FUNCTION_models$unet3d$losses$$$function__9___init__(PyObject *defaults, struct Nuitka_CellObject **closure) { - struct Nuitka_FunctionObject *result = Nuitka_Function_New( - impl_models$unet3d$losses$$$function__9___init__, - mod_consts[13], -#if PYTHON_VERSION >= 0x300 - mod_consts[161], -#endif - codeobj_38eaebfe4d2be968a308d6c799019465, - defaults, -#if PYTHON_VERSION >= 0x300 - NULL, - NULL, -#endif - module_models$unet3d$losses, - NULL, - closure, - 1 - ); - - - return (PyObject *)result; -} - - -extern void _initCompiledCellType(); -extern void _initCompiledGeneratorType(); -extern void _initCompiledFunctionType(); -extern void _initCompiledMethodType(); -extern void _initCompiledFrameType(); - -extern PyTypeObject Nuitka_Loader_Type; - -#ifdef _NUITKA_PLUGIN_DILL_ENABLED -// Provide a way to create find a function via its C code and create it back -// in another process, useful for multiprocessing extensions like dill -extern void registerDillPluginTables(char const *module_name, PyMethodDef *reduce_compiled_function, PyMethodDef *create_compiled_function); - -function_impl_code functable_models$unet3d$losses[] = { - impl_models$unet3d$losses$$$function__6___init__$$$function__1_lambda, - impl_models$unet3d$losses$$$function__1_compute_per_channel_dice, - impl_models$unet3d$losses$$$function__2___init__, - impl_models$unet3d$losses$$$function__3_forward, - impl_models$unet3d$losses$$$function__4___init__, - impl_models$unet3d$losses$$$function__5_forward, - impl_models$unet3d$losses$$$function__6___init__, - impl_models$unet3d$losses$$$function__7_dice, - impl_models$unet3d$losses$$$function__8_forward, - impl_models$unet3d$losses$$$function__9___init__, - impl_models$unet3d$losses$$$function__10_dice, - impl_models$unet3d$losses$$$function__11___init__, - impl_models$unet3d$losses$$$function__12_dice, - impl_models$unet3d$losses$$$function__13___init__, - impl_models$unet3d$losses$$$function__14_forward, - impl_models$unet3d$losses$$$function__15___init__, - impl_models$unet3d$losses$$$function__16_forward, - impl_models$unet3d$losses$$$function__17__class_weights, - impl_models$unet3d$losses$$$function__18___init__, - impl_models$unet3d$losses$$$function__19_forward, - impl_models$unet3d$losses$$$function__20___init__, - impl_models$unet3d$losses$$$function__21_forward, - impl_models$unet3d$losses$$$function__22_flatten, - impl_models$unet3d$losses$$$function__23_get_loss_criterion, - impl_models$unet3d$losses$$$function__24__create_loss, - NULL -}; - -static char const *_reduce_compiled_function_argnames[] = { - "func", - NULL -}; - -static PyObject *_reduce_compiled_function(PyObject *self, PyObject *args, PyObject *kwds) { - PyObject *func; - - if (!PyArg_ParseTupleAndKeywords(args, kwds, "O:reduce_compiled_function", (char **)_reduce_compiled_function_argnames, &func, NULL)) { - return NULL; - } - - if (Nuitka_Function_Check(func) == false) { - SET_CURRENT_EXCEPTION_TYPE0_STR(PyExc_TypeError, "not a compiled function"); - return NULL; - } - - struct Nuitka_FunctionObject *function = (struct Nuitka_FunctionObject *)func; - - function_impl_code *current = functable_models$unet3d$losses; - int offset = 0; - - while (*current != NULL) { - if (*current == function->m_c_code) { - break; - } - - current += 1; - offset += 1; - } - - if (*current == NULL) { - SET_CURRENT_EXCEPTION_TYPE0_STR(PyExc_TypeError, "Cannot find compiled function in module."); - return NULL; - } - - PyObject *code_object_desc = PyTuple_New(6); - PyTuple_SET_ITEM0(code_object_desc, 0, function->m_code_object->co_filename); - PyTuple_SET_ITEM0(code_object_desc, 1, function->m_code_object->co_name); - PyTuple_SET_ITEM(code_object_desc, 2, PyLong_FromLong(function->m_code_object->co_firstlineno)); - PyTuple_SET_ITEM0(code_object_desc, 3, function->m_code_object->co_varnames); - PyTuple_SET_ITEM(code_object_desc, 4, PyLong_FromLong(function->m_code_object->co_argcount)); - PyTuple_SET_ITEM(code_object_desc, 5, PyLong_FromLong(function->m_code_object->co_flags)); - - CHECK_OBJECT_DEEP(code_object_desc); - - PyObject *result = PyTuple_New(4); - PyTuple_SET_ITEM(result, 0, PyLong_FromLong(offset)); - PyTuple_SET_ITEM(result, 1, code_object_desc); - PyTuple_SET_ITEM0(result, 2, function->m_defaults); - PyTuple_SET_ITEM0(result, 3, function->m_doc != NULL ? function->m_doc : Py_None); - - CHECK_OBJECT_DEEP(result); - - return result; -} - -static PyMethodDef _method_def_reduce_compiled_function = {"reduce_compiled_function", (PyCFunction)_reduce_compiled_function, - METH_VARARGS | METH_KEYWORDS, NULL}; - -static char const *_create_compiled_function_argnames[] = { - "func", - "code_object_desc", - "defaults", - "doc", - NULL -}; - - -static PyObject *_create_compiled_function(PyObject *self, PyObject *args, PyObject *kwds) { - CHECK_OBJECT_DEEP(args); - - PyObject *func; - PyObject *code_object_desc; - PyObject *defaults; - PyObject *doc; - - if (!PyArg_ParseTupleAndKeywords(args, kwds, "OOOO:create_compiled_function", (char **)_create_compiled_function_argnames, &func, &code_object_desc, &defaults, &doc, NULL)) { - return NULL; - } - - int offset = PyLong_AsLong(func); - - if (offset == -1 && ERROR_OCCURRED()) { - return NULL; - } - - if (offset > sizeof(functable_models$unet3d$losses) || offset < 0) { - SET_CURRENT_EXCEPTION_TYPE0_STR(PyExc_TypeError, "Wrong offset for compiled function."); - return NULL; - } - - PyObject *filename = PyTuple_GET_ITEM(code_object_desc, 0); - PyObject *function_name = PyTuple_GET_ITEM(code_object_desc, 1); - PyObject *line = PyTuple_GET_ITEM(code_object_desc, 2); - int line_int = PyLong_AsLong(line); - assert(!ERROR_OCCURRED()); - - PyObject *argnames = PyTuple_GET_ITEM(code_object_desc, 3); - PyObject *arg_count = PyTuple_GET_ITEM(code_object_desc, 4); - int arg_count_int = PyLong_AsLong(arg_count); - assert(!ERROR_OCCURRED()); - PyObject *flags = PyTuple_GET_ITEM(code_object_desc, 5); - int flags_int = PyLong_AsLong(flags); - assert(!ERROR_OCCURRED()); - - PyCodeObject *code_object = MAKE_CODEOBJECT( - filename, - line_int, - flags_int, - function_name, - argnames, - NULL, // freevars - arg_count_int, - 0, // TODO: Missing kw_only_count - 0 // TODO: Missing pos_only_count - ); - - struct Nuitka_FunctionObject *result = Nuitka_Function_New( - functable_models$unet3d$losses[offset], - code_object->co_name, -#if PYTHON_VERSION >= 0x300 - NULL, // TODO: Not transferring qualname yet -#endif - code_object, - defaults, -#if PYTHON_VERSION >= 0x300 - NULL, // kwdefaults are done on the outside currently - NULL, // TODO: Not transferring annotations -#endif - module_models$unet3d$losses, - doc, - NULL, - 0 - ); - - return (PyObject *)result; -} - -static PyMethodDef _method_def_create_compiled_function = { - "create_compiled_function", - (PyCFunction)_create_compiled_function, - METH_VARARGS | METH_KEYWORDS, NULL -}; - - -#endif - -// Internal entry point for module code. -PyObject *modulecode_models$unet3d$losses(PyObject *module, struct Nuitka_MetaPathBasedLoaderEntry const *module_entry) { - module_models$unet3d$losses = module; - -#ifdef _NUITKA_MODULE - // In case of a stand alone extension module, need to call initialization - // the init here because that's the first and only time we are going to get - // called here. - - // Initialize the constant values used. - _initBuiltinModule(); - createGlobalConstants(); - - /* Initialize the compiled types of Nuitka. */ - _initCompiledCellType(); - _initCompiledGeneratorType(); - _initCompiledFunctionType(); - _initCompiledMethodType(); - _initCompiledFrameType(); - -#if PYTHON_VERSION < 0x300 - _initSlotCompare(); -#endif -#if PYTHON_VERSION >= 0x270 - _initSlotIternext(); -#endif - - patchBuiltinModule(); - patchTypeComparison(); - - // Enable meta path based loader if not already done. -#ifdef _NUITKA_TRACE - PRINT_STRING("models.unet3d.losses: Calling setupMetaPathBasedLoader().\n"); -#endif - setupMetaPathBasedLoader(); - -#if PYTHON_VERSION >= 0x300 - patchInspectModule(); -#endif - -#endif - - /* The constants only used by this module are created now. */ -#ifdef _NUITKA_TRACE - PRINT_STRING("models.unet3d.losses: Calling createModuleConstants().\n"); -#endif - createModuleConstants(); - - /* The code objects used by this module are created now. */ -#ifdef _NUITKA_TRACE - PRINT_STRING("models.unet3d.losses: Calling createModuleCodeObjects().\n"); -#endif - createModuleCodeObjects(); - - // PRINT_STRING("in initmodels$unet3d$losses\n"); - - // Create the module object first. There are no methods initially, all are - // added dynamically in actual code only. Also no "__doc__" is initially - // set at this time, as it could not contain NUL characters this way, they - // are instead set in early module code. No "self" for modules, we have no - // use for it. - - moduledict_models$unet3d$losses = MODULE_DICT(module_models$unet3d$losses); - -#ifdef _NUITKA_PLUGIN_DILL_ENABLED - registerDillPluginTables(module_entry->name, &_method_def_reduce_compiled_function, &_method_def_create_compiled_function); -#endif - - // Set "__compiled__" to what version information we have. - UPDATE_STRING_DICT0( - moduledict_models$unet3d$losses, - (Nuitka_StringObject *)const_str_plain___compiled__, - Nuitka_dunder_compiled_value - ); - - // Update "__package__" value to what it ought to be. - { -#if 0 - UPDATE_STRING_DICT0( - moduledict_models$unet3d$losses, - (Nuitka_StringObject *)const_str_plain___package__, - const_str_empty - ); -#elif 0 - PyObject *module_name = GET_STRING_DICT_VALUE(moduledict_models$unet3d$losses, (Nuitka_StringObject *)const_str_plain___name__); - - UPDATE_STRING_DICT0( - moduledict_models$unet3d$losses, - (Nuitka_StringObject *)const_str_plain___package__, - module_name - ); -#else - -#if PYTHON_VERSION < 0x300 - PyObject *module_name = GET_STRING_DICT_VALUE(moduledict_models$unet3d$losses, (Nuitka_StringObject *)const_str_plain___name__); - char const *module_name_cstr = PyString_AS_STRING(module_name); - - char const *last_dot = strrchr(module_name_cstr, '.'); - - if (last_dot != NULL) { - UPDATE_STRING_DICT1( - moduledict_models$unet3d$losses, - (Nuitka_StringObject *)const_str_plain___package__, - PyString_FromStringAndSize(module_name_cstr, last_dot - module_name_cstr) - ); - } -#else - PyObject *module_name = GET_STRING_DICT_VALUE(moduledict_models$unet3d$losses, (Nuitka_StringObject *)const_str_plain___name__); - Py_ssize_t dot_index = PyUnicode_Find(module_name, const_str_dot, 0, PyUnicode_GetLength(module_name), -1); - - if (dot_index != -1) { - UPDATE_STRING_DICT1( - moduledict_models$unet3d$losses, - (Nuitka_StringObject *)const_str_plain___package__, - PyUnicode_Substring(module_name, 0, dot_index) - ); - } -#endif -#endif - } - - CHECK_OBJECT(module_models$unet3d$losses); - - // For deep importing of a module we need to have "__builtins__", so we set - // it ourselves in the same way than CPython does. Note: This must be done - // before the frame object is allocated, or else it may fail. - - if (GET_STRING_DICT_VALUE(moduledict_models$unet3d$losses, (Nuitka_StringObject *)const_str_plain___builtins__) == NULL) { - PyObject *value = (PyObject *)builtin_module; - - // Check if main module, not a dict then but the module itself. -#if !defined(_NUITKA_EXE) || !0 - value = PyModule_GetDict(value); -#endif - - UPDATE_STRING_DICT0(moduledict_models$unet3d$losses, (Nuitka_StringObject *)const_str_plain___builtins__, value); - } - -#if PYTHON_VERSION >= 0x300 - UPDATE_STRING_DICT0(moduledict_models$unet3d$losses, (Nuitka_StringObject *)const_str_plain___loader__, (PyObject *)&Nuitka_Loader_Type); -#endif - -#if PYTHON_VERSION >= 0x340 -// Set the "__spec__" value - -#if 0 - // Main modules just get "None" as spec. - UPDATE_STRING_DICT0(moduledict_models$unet3d$losses, (Nuitka_StringObject *)const_str_plain___spec__, Py_None); -#else - // Other modules get a "ModuleSpec" from the standard mechanism. - { - PyObject *bootstrap_module = getImportLibBootstrapModule(); - CHECK_OBJECT(bootstrap_module); - - PyObject *_spec_from_module = PyObject_GetAttrString(bootstrap_module, "_spec_from_module"); - CHECK_OBJECT(_spec_from_module); - - PyObject *spec_value = CALL_FUNCTION_WITH_SINGLE_ARG(_spec_from_module, module_models$unet3d$losses); - Py_DECREF(_spec_from_module); - - // We can assume this to never fail, or else we are in trouble anyway. - // CHECK_OBJECT(spec_value); - - if (spec_value == NULL) { - PyErr_PrintEx(0); - abort(); - } - -// Mark the execution in the "__spec__" value. - SET_ATTRIBUTE(spec_value, const_str_plain__initializing, Py_True); - - UPDATE_STRING_DICT1(moduledict_models$unet3d$losses, (Nuitka_StringObject *)const_str_plain___spec__, spec_value); - } -#endif -#endif - - // Temp variables if any - PyObject *outline_0_var___class__ = NULL; - PyObject *outline_1_var___class__ = NULL; - PyObject *outline_2_var___class__ = NULL; - struct Nuitka_CellObject *outline_3_var___class__ = Nuitka_Cell_Empty(); - struct Nuitka_CellObject *outline_4_var___class__ = Nuitka_Cell_Empty(); - PyObject *outline_5_var___class__ = NULL; - PyObject *outline_6_var___class__ = NULL; - PyObject *outline_7_var___class__ = NULL; - struct Nuitka_CellObject *outline_8_var___class__ = Nuitka_Cell_Empty(); - PyObject *tmp_class_creation_1__bases = NULL; - PyObject *tmp_class_creation_1__bases_orig = NULL; - PyObject *tmp_class_creation_1__class_decl_dict = NULL; - PyObject *tmp_class_creation_1__metaclass = NULL; - PyObject *tmp_class_creation_1__prepared = NULL; - PyObject *tmp_class_creation_2__bases = NULL; - PyObject *tmp_class_creation_2__bases_orig = NULL; - PyObject *tmp_class_creation_2__class_decl_dict = NULL; - PyObject *tmp_class_creation_2__metaclass = NULL; - PyObject *tmp_class_creation_2__prepared = NULL; - PyObject *tmp_class_creation_3__bases = NULL; - PyObject *tmp_class_creation_3__bases_orig = NULL; - PyObject *tmp_class_creation_3__class_decl_dict = NULL; - PyObject *tmp_class_creation_3__metaclass = NULL; - PyObject *tmp_class_creation_3__prepared = NULL; - PyObject *tmp_class_creation_4__bases = NULL; - PyObject *tmp_class_creation_4__bases_orig = NULL; - PyObject *tmp_class_creation_4__class_decl_dict = NULL; - PyObject *tmp_class_creation_4__metaclass = NULL; - PyObject *tmp_class_creation_4__prepared = NULL; - PyObject *tmp_class_creation_5__bases = NULL; - PyObject *tmp_class_creation_5__bases_orig = NULL; - PyObject *tmp_class_creation_5__class_decl_dict = NULL; - PyObject *tmp_class_creation_5__metaclass = NULL; - PyObject *tmp_class_creation_5__prepared = NULL; - PyObject *tmp_class_creation_6__bases = NULL; - PyObject *tmp_class_creation_6__bases_orig = NULL; - PyObject *tmp_class_creation_6__class_decl_dict = NULL; - PyObject *tmp_class_creation_6__metaclass = NULL; - PyObject *tmp_class_creation_6__prepared = NULL; - PyObject *tmp_class_creation_7__bases = NULL; - PyObject *tmp_class_creation_7__bases_orig = NULL; - PyObject *tmp_class_creation_7__class_decl_dict = NULL; - PyObject *tmp_class_creation_7__metaclass = NULL; - PyObject *tmp_class_creation_7__prepared = NULL; - PyObject *tmp_class_creation_8__bases = NULL; - PyObject *tmp_class_creation_8__bases_orig = NULL; - PyObject *tmp_class_creation_8__class_decl_dict = NULL; - PyObject *tmp_class_creation_8__metaclass = NULL; - PyObject *tmp_class_creation_8__prepared = NULL; - PyObject *tmp_class_creation_9__bases = NULL; - PyObject *tmp_class_creation_9__bases_orig = NULL; - PyObject *tmp_class_creation_9__class_decl_dict = NULL; - PyObject *tmp_class_creation_9__metaclass = NULL; - PyObject *tmp_class_creation_9__prepared = NULL; - PyObject *tmp_import_from_1__module = NULL; - struct Nuitka_FrameObject *frame_705bf4315d2d4f531dff5d3d03b1beec; - NUITKA_MAY_BE_UNUSED char const *type_description_1 = NULL; - bool tmp_result; - PyObject *exception_type = NULL; - PyObject *exception_value = NULL; - PyTracebackObject *exception_tb = NULL; - NUITKA_MAY_BE_UNUSED int exception_lineno = 0; - PyObject *exception_keeper_type_1; - PyObject *exception_keeper_value_1; - PyTracebackObject *exception_keeper_tb_1; - NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_1; - int tmp_res; - PyObject *tmp_dictdel_dict; - PyObject *tmp_dictdel_key; - PyObject *locals_models$unet3d$losses$$$class__1__MaskingLossWrapper_39 = NULL; - PyObject *tmp_dictset_value; - struct Nuitka_FrameObject *frame_653cd49c73152390d2f5ad682e34a196_2; - NUITKA_MAY_BE_UNUSED char const *type_description_2 = NULL; - static struct Nuitka_FrameObject *cache_frame_653cd49c73152390d2f5ad682e34a196_2 = NULL; - PyObject *exception_keeper_type_2; - PyObject *exception_keeper_value_2; - PyTracebackObject *exception_keeper_tb_2; - NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_2; - PyObject *exception_keeper_type_3; - PyObject *exception_keeper_value_3; - PyTracebackObject *exception_keeper_tb_3; - NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_3; - PyObject *exception_keeper_type_4; - PyObject *exception_keeper_value_4; - PyTracebackObject *exception_keeper_tb_4; - NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_4; - PyObject *locals_models$unet3d$losses$$$class__2_SkipLastTargetChannelWrapper_62 = NULL; - struct Nuitka_FrameObject *frame_102f6d9c8caf3c07fcacb9b74c819b61_3; - NUITKA_MAY_BE_UNUSED char const *type_description_3 = NULL; - static struct Nuitka_FrameObject *cache_frame_102f6d9c8caf3c07fcacb9b74c819b61_3 = NULL; - PyObject *exception_keeper_type_5; - PyObject *exception_keeper_value_5; - PyTracebackObject *exception_keeper_tb_5; - NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_5; - PyObject *exception_keeper_type_6; - PyObject *exception_keeper_value_6; - PyTracebackObject *exception_keeper_tb_6; - NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_6; - PyObject *exception_keeper_type_7; - PyObject *exception_keeper_value_7; - PyTracebackObject *exception_keeper_tb_7; - NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_7; - PyObject *locals_models$unet3d$losses$$$class__3__AbstractDiceLoss_84 = NULL; - struct Nuitka_FrameObject *frame_f19ed9ee26d93c2e82ea0c001dacbbbc_4; - NUITKA_MAY_BE_UNUSED char const *type_description_4 = NULL; - static struct Nuitka_FrameObject *cache_frame_f19ed9ee26d93c2e82ea0c001dacbbbc_4 = NULL; - PyObject *exception_keeper_type_8; - PyObject *exception_keeper_value_8; - PyTracebackObject *exception_keeper_tb_8; - NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_8; - PyObject *exception_keeper_type_9; - PyObject *exception_keeper_value_9; - PyTracebackObject *exception_keeper_tb_9; - NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_9; - PyObject *exception_keeper_type_10; - PyObject *exception_keeper_value_10; - PyTracebackObject *exception_keeper_tb_10; - NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_10; - PyObject *locals_models$unet3d$losses$$$class__4_DiceLoss_120 = NULL; - struct Nuitka_FrameObject *frame_7a70797e1919541bc6bae64c7102f99b_5; - NUITKA_MAY_BE_UNUSED char const *type_description_5 = NULL; - static struct Nuitka_FrameObject *cache_frame_7a70797e1919541bc6bae64c7102f99b_5 = NULL; - PyObject *exception_keeper_type_11; - PyObject *exception_keeper_value_11; - PyTracebackObject *exception_keeper_tb_11; - NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_11; - PyObject *exception_keeper_type_12; - PyObject *exception_keeper_value_12; - PyTracebackObject *exception_keeper_tb_12; - NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_12; - PyObject *exception_keeper_type_13; - PyObject *exception_keeper_value_13; - PyTracebackObject *exception_keeper_tb_13; - NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_13; - PyObject *locals_models$unet3d$losses$$$class__5_GeneralizedDiceLoss_133 = NULL; - struct Nuitka_FrameObject *frame_0f3b06d4df296077ba10f315932c80a2_6; - NUITKA_MAY_BE_UNUSED char const *type_description_6 = NULL; - static struct Nuitka_FrameObject *cache_frame_0f3b06d4df296077ba10f315932c80a2_6 = NULL; - PyObject *exception_keeper_type_14; - PyObject *exception_keeper_value_14; - PyTracebackObject *exception_keeper_tb_14; - NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_14; - PyObject *exception_keeper_type_15; - PyObject *exception_keeper_value_15; - PyTracebackObject *exception_keeper_tb_15; - NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_15; - PyObject *exception_keeper_type_16; - PyObject *exception_keeper_value_16; - PyTracebackObject *exception_keeper_tb_16; - NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_16; - PyObject *locals_models$unet3d$losses$$$class__6_BCEDiceLoss_168 = NULL; - struct Nuitka_FrameObject *frame_79c7d5960b91f122e38985085658fe13_7; - NUITKA_MAY_BE_UNUSED char const *type_description_7 = NULL; - static struct Nuitka_FrameObject *cache_frame_79c7d5960b91f122e38985085658fe13_7 = NULL; - PyObject *exception_keeper_type_17; - PyObject *exception_keeper_value_17; - PyTracebackObject *exception_keeper_tb_17; - NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_17; - PyObject *exception_keeper_type_18; - PyObject *exception_keeper_value_18; - PyTracebackObject *exception_keeper_tb_18; - NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_18; - PyObject *exception_keeper_type_19; - PyObject *exception_keeper_value_19; - PyTracebackObject *exception_keeper_tb_19; - NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_19; - PyObject *locals_models$unet3d$losses$$$class__7_WeightedCrossEntropyLoss_182 = NULL; - struct Nuitka_FrameObject *frame_b82f846403c5bbd1de1ab21ea54bad05_8; - NUITKA_MAY_BE_UNUSED char const *type_description_8 = NULL; - static struct Nuitka_FrameObject *cache_frame_b82f846403c5bbd1de1ab21ea54bad05_8 = NULL; - PyObject *exception_keeper_type_20; - PyObject *exception_keeper_value_20; - PyTracebackObject *exception_keeper_tb_20; - NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_20; - PyObject *exception_keeper_type_21; - PyObject *exception_keeper_value_21; - PyTracebackObject *exception_keeper_tb_21; - NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_21; - PyObject *exception_keeper_type_22; - PyObject *exception_keeper_value_22; - PyTracebackObject *exception_keeper_tb_22; - NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_22; - PyObject *locals_models$unet3d$losses$$$class__8_PixelWiseCrossEntropyLoss_205 = NULL; - struct Nuitka_FrameObject *frame_829d0a1ffa540ba75404cd988b32f0b5_9; - NUITKA_MAY_BE_UNUSED char const *type_description_9 = NULL; - static struct Nuitka_FrameObject *cache_frame_829d0a1ffa540ba75404cd988b32f0b5_9 = NULL; - PyObject *exception_keeper_type_23; - PyObject *exception_keeper_value_23; - PyTracebackObject *exception_keeper_tb_23; - NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_23; - PyObject *exception_keeper_type_24; - PyObject *exception_keeper_value_24; - PyTracebackObject *exception_keeper_tb_24; - NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_24; - PyObject *exception_keeper_type_25; - PyObject *exception_keeper_value_25; - PyTracebackObject *exception_keeper_tb_25; - NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_25; - PyObject *locals_models$unet3d$losses$$$class__9_WeightedSmoothL1Loss_240 = NULL; - struct Nuitka_FrameObject *frame_0812d28c0fd416b215956f202c82484e_10; - NUITKA_MAY_BE_UNUSED char const *type_description_10 = NULL; - static struct Nuitka_FrameObject *cache_frame_0812d28c0fd416b215956f202c82484e_10 = NULL; - PyObject *exception_keeper_type_26; - PyObject *exception_keeper_value_26; - PyTracebackObject *exception_keeper_tb_26; - NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_26; - PyObject *exception_keeper_type_27; - PyObject *exception_keeper_value_27; - PyTracebackObject *exception_keeper_tb_27; - NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_27; - PyObject *exception_keeper_type_28; - PyObject *exception_keeper_value_28; - PyTracebackObject *exception_keeper_tb_28; - NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_28; - - // Module code. - { - PyObject *tmp_assign_source_1; - tmp_assign_source_1 = Py_None; - UPDATE_STRING_DICT0(moduledict_models$unet3d$losses, (Nuitka_StringObject *)mod_consts[121], tmp_assign_source_1); - } - { - PyObject *tmp_assign_source_2; - tmp_assign_source_2 = module_filename_obj; - UPDATE_STRING_DICT0(moduledict_models$unet3d$losses, (Nuitka_StringObject *)mod_consts[122], tmp_assign_source_2); - } - // Frame without reuse. - frame_705bf4315d2d4f531dff5d3d03b1beec = MAKE_MODULE_FRAME(codeobj_705bf4315d2d4f531dff5d3d03b1beec, module_models$unet3d$losses); - - // Push the new frame as the currently active one, and we should be exclusively - // owning it. - pushFrameStack(frame_705bf4315d2d4f531dff5d3d03b1beec); - assert(Py_REFCNT(frame_705bf4315d2d4f531dff5d3d03b1beec) == 2); - - // Framed code: - { - PyObject *tmp_assattr_name_1; - PyObject *tmp_assattr_target_1; - tmp_assattr_name_1 = module_filename_obj; - tmp_assattr_target_1 = GET_STRING_DICT_VALUE(moduledict_models$unet3d$losses, (Nuitka_StringObject *)mod_consts[123]); - - if (unlikely(tmp_assattr_target_1 == NULL)) { - tmp_assattr_target_1 = GET_MODULE_VARIABLE_VALUE_FALLBACK(mod_consts[123]); - } - - assert(!(tmp_assattr_target_1 == NULL)); - tmp_result = SET_ATTRIBUTE(tmp_assattr_target_1, mod_consts[124], tmp_assattr_name_1); - if (tmp_result == false) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 1; - - goto frame_exception_exit_1; - } - } - { - PyObject *tmp_assattr_name_2; - PyObject *tmp_assattr_target_2; - tmp_assattr_name_2 = Py_True; - tmp_assattr_target_2 = GET_STRING_DICT_VALUE(moduledict_models$unet3d$losses, (Nuitka_StringObject *)mod_consts[123]); - - if (unlikely(tmp_assattr_target_2 == NULL)) { - tmp_assattr_target_2 = GET_MODULE_VARIABLE_VALUE_FALLBACK(mod_consts[123]); - } - - assert(!(tmp_assattr_target_2 == NULL)); - tmp_result = SET_ATTRIBUTE(tmp_assattr_target_2, mod_consts[125], tmp_assattr_name_2); - if (tmp_result == false) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 1; - - goto frame_exception_exit_1; - } - } - { - PyObject *tmp_assign_source_3; - tmp_assign_source_3 = Py_None; - UPDATE_STRING_DICT0(moduledict_models$unet3d$losses, (Nuitka_StringObject *)mod_consts[126], tmp_assign_source_3); - } - { - PyObject *tmp_assign_source_4; - PyObject *tmp_name_name_1; - PyObject *tmp_globals_arg_name_1; - PyObject *tmp_locals_arg_name_1; - PyObject *tmp_fromlist_name_1; - PyObject *tmp_level_name_1; - tmp_name_name_1 = mod_consts[28]; - tmp_globals_arg_name_1 = (PyObject *)moduledict_models$unet3d$losses; - tmp_locals_arg_name_1 = Py_None; - tmp_fromlist_name_1 = Py_None; - tmp_level_name_1 = mod_consts[127]; - frame_705bf4315d2d4f531dff5d3d03b1beec->m_frame.f_lineno = 1; - tmp_assign_source_4 = IMPORT_MODULE5(tmp_name_name_1, tmp_globals_arg_name_1, tmp_locals_arg_name_1, tmp_fromlist_name_1, tmp_level_name_1); - if (tmp_assign_source_4 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 1; - - goto frame_exception_exit_1; - } - UPDATE_STRING_DICT1(moduledict_models$unet3d$losses, (Nuitka_StringObject *)mod_consts[28], tmp_assign_source_4); - } - { - PyObject *tmp_assign_source_5; - PyObject *tmp_import_name_from_1; - PyObject *tmp_import_name_from_2; - PyObject *tmp_name_name_2; - PyObject *tmp_globals_arg_name_2; - PyObject *tmp_locals_arg_name_2; - PyObject *tmp_fromlist_name_2; - PyObject *tmp_level_name_2; - tmp_name_name_2 = mod_consts[128]; - tmp_globals_arg_name_2 = (PyObject *)moduledict_models$unet3d$losses; - tmp_locals_arg_name_2 = Py_None; - tmp_fromlist_name_2 = Py_None; - tmp_level_name_2 = mod_consts[127]; - frame_705bf4315d2d4f531dff5d3d03b1beec->m_frame.f_lineno = 2; - tmp_import_name_from_2 = IMPORT_MODULE5(tmp_name_name_2, tmp_globals_arg_name_2, tmp_locals_arg_name_2, tmp_fromlist_name_2, tmp_level_name_2); - if (tmp_import_name_from_2 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 2; - - goto frame_exception_exit_1; - } - if (PyModule_Check(tmp_import_name_from_2)) { - tmp_import_name_from_1 = IMPORT_NAME_OR_MODULE( - tmp_import_name_from_2, - (PyObject *)moduledict_models$unet3d$losses, - mod_consts[36], - mod_consts[127] - ); - } else { - tmp_import_name_from_1 = IMPORT_NAME(tmp_import_name_from_2, mod_consts[36]); - } - - Py_DECREF(tmp_import_name_from_2); - if (tmp_import_name_from_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 2; - - goto frame_exception_exit_1; - } - if (PyModule_Check(tmp_import_name_from_1)) { - tmp_assign_source_5 = IMPORT_NAME_OR_MODULE( - tmp_import_name_from_1, - (PyObject *)moduledict_models$unet3d$losses, - mod_consts[129], - mod_consts[127] - ); - } else { - tmp_assign_source_5 = IMPORT_NAME(tmp_import_name_from_1, mod_consts[129]); - } - - Py_DECREF(tmp_import_name_from_1); - if (tmp_assign_source_5 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 2; - - goto frame_exception_exit_1; - } - UPDATE_STRING_DICT1(moduledict_models$unet3d$losses, (Nuitka_StringObject *)mod_consts[61], tmp_assign_source_5); - } - { - PyObject *tmp_assign_source_6; - PyObject *tmp_import_name_from_3; - PyObject *tmp_name_name_3; - PyObject *tmp_globals_arg_name_3; - PyObject *tmp_locals_arg_name_3; - PyObject *tmp_fromlist_name_3; - PyObject *tmp_level_name_3; - tmp_name_name_3 = mod_consts[28]; - tmp_globals_arg_name_3 = (PyObject *)moduledict_models$unet3d$losses; - tmp_locals_arg_name_3 = Py_None; - tmp_fromlist_name_3 = mod_consts[130]; - tmp_level_name_3 = mod_consts[127]; - frame_705bf4315d2d4f531dff5d3d03b1beec->m_frame.f_lineno = 3; - tmp_import_name_from_3 = IMPORT_MODULE5(tmp_name_name_3, tmp_globals_arg_name_3, tmp_locals_arg_name_3, tmp_fromlist_name_3, tmp_level_name_3); - if (tmp_import_name_from_3 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 3; - - goto frame_exception_exit_1; - } - if (PyModule_Check(tmp_import_name_from_3)) { - tmp_assign_source_6 = IMPORT_NAME_OR_MODULE( - tmp_import_name_from_3, - (PyObject *)moduledict_models$unet3d$losses, - mod_consts[36], - mod_consts[127] - ); - } else { - tmp_assign_source_6 = IMPORT_NAME(tmp_import_name_from_3, mod_consts[36]); - } - - Py_DECREF(tmp_import_name_from_3); - if (tmp_assign_source_6 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 3; - - goto frame_exception_exit_1; - } - UPDATE_STRING_DICT1(moduledict_models$unet3d$losses, (Nuitka_StringObject *)mod_consts[36], tmp_assign_source_6); - } - { - PyObject *tmp_assign_source_7; - PyObject *tmp_import_name_from_4; - PyObject *tmp_name_name_4; - PyObject *tmp_globals_arg_name_4; - PyObject *tmp_locals_arg_name_4; - PyObject *tmp_fromlist_name_4; - PyObject *tmp_level_name_4; - tmp_name_name_4 = mod_consts[131]; - tmp_globals_arg_name_4 = (PyObject *)moduledict_models$unet3d$losses; - tmp_locals_arg_name_4 = Py_None; - tmp_fromlist_name_4 = mod_consts[132]; - tmp_level_name_4 = mod_consts[127]; - frame_705bf4315d2d4f531dff5d3d03b1beec->m_frame.f_lineno = 4; - tmp_import_name_from_4 = IMPORT_MODULE5(tmp_name_name_4, tmp_globals_arg_name_4, tmp_locals_arg_name_4, tmp_fromlist_name_4, tmp_level_name_4); - if (tmp_import_name_from_4 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 4; - - goto frame_exception_exit_1; - } - if (PyModule_Check(tmp_import_name_from_4)) { - tmp_assign_source_7 = IMPORT_NAME_OR_MODULE( - tmp_import_name_from_4, - (PyObject *)moduledict_models$unet3d$losses, - mod_consts[64], - mod_consts[127] - ); - } else { - tmp_assign_source_7 = IMPORT_NAME(tmp_import_name_from_4, mod_consts[64]); - } - - Py_DECREF(tmp_import_name_from_4); - if (tmp_assign_source_7 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 4; - - goto frame_exception_exit_1; - } - UPDATE_STRING_DICT1(moduledict_models$unet3d$losses, (Nuitka_StringObject *)mod_consts[64], tmp_assign_source_7); - } - { - PyObject *tmp_assign_source_8; - PyObject *tmp_name_name_5; - PyObject *tmp_globals_arg_name_5; - PyObject *tmp_locals_arg_name_5; - PyObject *tmp_fromlist_name_5; - PyObject *tmp_level_name_5; - tmp_name_name_5 = mod_consts[133]; - tmp_globals_arg_name_5 = (PyObject *)moduledict_models$unet3d$losses; - tmp_locals_arg_name_5 = Py_None; - tmp_fromlist_name_5 = mod_consts[134]; - tmp_level_name_5 = mod_consts[127]; - frame_705bf4315d2d4f531dff5d3d03b1beec->m_frame.f_lineno = 5; - tmp_assign_source_8 = IMPORT_MODULE5(tmp_name_name_5, tmp_globals_arg_name_5, tmp_locals_arg_name_5, tmp_fromlist_name_5, tmp_level_name_5); - if (tmp_assign_source_8 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 5; - - goto frame_exception_exit_1; - } - assert(tmp_import_from_1__module == NULL); - tmp_import_from_1__module = tmp_assign_source_8; - } - // Tried code: - { - PyObject *tmp_assign_source_9; - PyObject *tmp_import_name_from_5; - CHECK_OBJECT(tmp_import_from_1__module); - tmp_import_name_from_5 = tmp_import_from_1__module; - if (PyModule_Check(tmp_import_name_from_5)) { - tmp_assign_source_9 = IMPORT_NAME_OR_MODULE( - tmp_import_name_from_5, - (PyObject *)moduledict_models$unet3d$losses, - mod_consts[112], - mod_consts[127] - ); - } else { - tmp_assign_source_9 = IMPORT_NAME(tmp_import_name_from_5, mod_consts[112]); - } - - if (tmp_assign_source_9 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 5; - - goto try_except_handler_1; - } - UPDATE_STRING_DICT1(moduledict_models$unet3d$losses, (Nuitka_StringObject *)mod_consts[112], tmp_assign_source_9); - } - { - PyObject *tmp_assign_source_10; - PyObject *tmp_import_name_from_6; - CHECK_OBJECT(tmp_import_from_1__module); - tmp_import_name_from_6 = tmp_import_from_1__module; - if (PyModule_Check(tmp_import_name_from_6)) { - tmp_assign_source_10 = IMPORT_NAME_OR_MODULE( - tmp_import_name_from_6, - (PyObject *)moduledict_models$unet3d$losses, - mod_consts[113], - mod_consts[127] - ); - } else { - tmp_assign_source_10 = IMPORT_NAME(tmp_import_name_from_6, mod_consts[113]); - } - - if (tmp_assign_source_10 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 5; - - goto try_except_handler_1; - } - UPDATE_STRING_DICT1(moduledict_models$unet3d$losses, (Nuitka_StringObject *)mod_consts[113], tmp_assign_source_10); - } - { - PyObject *tmp_assign_source_11; - PyObject *tmp_import_name_from_7; - CHECK_OBJECT(tmp_import_from_1__module); - tmp_import_name_from_7 = tmp_import_from_1__module; - if (PyModule_Check(tmp_import_name_from_7)) { - tmp_assign_source_11 = IMPORT_NAME_OR_MODULE( - tmp_import_name_from_7, - (PyObject *)moduledict_models$unet3d$losses, - mod_consts[114], - mod_consts[127] - ); - } else { - tmp_assign_source_11 = IMPORT_NAME(tmp_import_name_from_7, mod_consts[114]); - } - - if (tmp_assign_source_11 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 5; - - goto try_except_handler_1; - } - UPDATE_STRING_DICT1(moduledict_models$unet3d$losses, (Nuitka_StringObject *)mod_consts[114], tmp_assign_source_11); - } - goto try_end_1; - // Exception handler code: - try_except_handler_1:; - exception_keeper_type_1 = exception_type; - exception_keeper_value_1 = exception_value; - exception_keeper_tb_1 = exception_tb; - exception_keeper_lineno_1 = exception_lineno; - exception_type = NULL; - exception_value = NULL; - exception_tb = NULL; - exception_lineno = 0; - - CHECK_OBJECT(tmp_import_from_1__module); - Py_DECREF(tmp_import_from_1__module); - tmp_import_from_1__module = NULL; - // Re-raise. - exception_type = exception_keeper_type_1; - exception_value = exception_keeper_value_1; - exception_tb = exception_keeper_tb_1; - exception_lineno = exception_keeper_lineno_1; - - goto frame_exception_exit_1; - // End of try: - try_end_1:; - CHECK_OBJECT(tmp_import_from_1__module); - Py_DECREF(tmp_import_from_1__module); - tmp_import_from_1__module = NULL; - { - PyObject *tmp_assign_source_12; - PyObject *tmp_import_name_from_8; - PyObject *tmp_name_name_6; - PyObject *tmp_globals_arg_name_6; - PyObject *tmp_locals_arg_name_6; - PyObject *tmp_fromlist_name_6; - PyObject *tmp_level_name_6; - tmp_name_name_6 = mod_consts[135]; - tmp_globals_arg_name_6 = (PyObject *)moduledict_models$unet3d$losses; - tmp_locals_arg_name_6 = Py_None; - tmp_fromlist_name_6 = mod_consts[136]; - tmp_level_name_6 = mod_consts[127]; - frame_705bf4315d2d4f531dff5d3d03b1beec->m_frame.f_lineno = 7; - tmp_import_name_from_8 = IMPORT_MODULE5(tmp_name_name_6, tmp_globals_arg_name_6, tmp_locals_arg_name_6, tmp_fromlist_name_6, tmp_level_name_6); - if (tmp_import_name_from_8 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 7; - - goto frame_exception_exit_1; - } - if (PyModule_Check(tmp_import_name_from_8)) { - tmp_assign_source_12 = IMPORT_NAME_OR_MODULE( - tmp_import_name_from_8, - (PyObject *)moduledict_models$unet3d$losses, - mod_consts[70], - mod_consts[127] - ); - } else { - tmp_assign_source_12 = IMPORT_NAME(tmp_import_name_from_8, mod_consts[70]); - } - - Py_DECREF(tmp_import_name_from_8); - if (tmp_assign_source_12 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 7; - - goto frame_exception_exit_1; - } - UPDATE_STRING_DICT1(moduledict_models$unet3d$losses, (Nuitka_StringObject *)mod_consts[70], tmp_assign_source_12); - } - { - PyObject *tmp_assign_source_13; - PyObject *tmp_defaults_1; - tmp_defaults_1 = mod_consts[137]; - Py_INCREF(tmp_defaults_1); - - - tmp_assign_source_13 = MAKE_FUNCTION_models$unet3d$losses$$$function__1_compute_per_channel_dice(tmp_defaults_1); - - UPDATE_STRING_DICT1(moduledict_models$unet3d$losses, (Nuitka_StringObject *)mod_consts[47], tmp_assign_source_13); - } - // Tried code: - { - PyObject *tmp_assign_source_14; - PyObject *tmp_tuple_element_1; - PyObject *tmp_expression_name_1; - tmp_expression_name_1 = GET_STRING_DICT_VALUE(moduledict_models$unet3d$losses, (Nuitka_StringObject *)mod_consts[36]); - - if (unlikely(tmp_expression_name_1 == NULL)) { - tmp_expression_name_1 = GET_MODULE_VARIABLE_VALUE_FALLBACK(mod_consts[36]); - } - - if (tmp_expression_name_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 39; - - goto try_except_handler_2; - } - tmp_tuple_element_1 = LOOKUP_ATTRIBUTE(tmp_expression_name_1, mod_consts[138]); - if (tmp_tuple_element_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 39; - - goto try_except_handler_2; - } - tmp_assign_source_14 = PyTuple_New(1); - PyTuple_SET_ITEM(tmp_assign_source_14, 0, tmp_tuple_element_1); - assert(tmp_class_creation_1__bases_orig == NULL); - tmp_class_creation_1__bases_orig = tmp_assign_source_14; - } - { - PyObject *tmp_assign_source_15; - PyObject *tmp_dircall_arg1_1; - CHECK_OBJECT(tmp_class_creation_1__bases_orig); - tmp_dircall_arg1_1 = tmp_class_creation_1__bases_orig; - Py_INCREF(tmp_dircall_arg1_1); - - { - PyObject *dir_call_args[] = {tmp_dircall_arg1_1}; - tmp_assign_source_15 = impl_models$$$function__1__mro_entries_conversion(dir_call_args); - } - if (tmp_assign_source_15 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 39; - - goto try_except_handler_2; - } - assert(tmp_class_creation_1__bases == NULL); - tmp_class_creation_1__bases = tmp_assign_source_15; - } - { - PyObject *tmp_assign_source_16; - tmp_assign_source_16 = PyDict_New(); - assert(tmp_class_creation_1__class_decl_dict == NULL); - tmp_class_creation_1__class_decl_dict = tmp_assign_source_16; - } - { - PyObject *tmp_assign_source_17; - PyObject *tmp_metaclass_name_1; - nuitka_bool tmp_condition_result_1; - PyObject *tmp_key_name_1; - PyObject *tmp_dict_arg_name_1; - PyObject *tmp_dict_arg_name_2; - PyObject *tmp_key_name_2; - nuitka_bool tmp_condition_result_2; - int tmp_truth_name_1; - PyObject *tmp_type_arg_1; - PyObject *tmp_expression_name_2; - PyObject *tmp_subscript_name_1; - PyObject *tmp_bases_name_1; - tmp_key_name_1 = mod_consts[139]; - CHECK_OBJECT(tmp_class_creation_1__class_decl_dict); - tmp_dict_arg_name_1 = tmp_class_creation_1__class_decl_dict; - tmp_res = DICT_HAS_ITEM(tmp_dict_arg_name_1, tmp_key_name_1); - assert(!(tmp_res == -1)); - tmp_condition_result_1 = (tmp_res != 0) ? NUITKA_BOOL_TRUE : NUITKA_BOOL_FALSE; - if (tmp_condition_result_1 == NUITKA_BOOL_TRUE) { - goto condexpr_true_1; - } else { - goto condexpr_false_1; - } - condexpr_true_1:; - CHECK_OBJECT(tmp_class_creation_1__class_decl_dict); - tmp_dict_arg_name_2 = tmp_class_creation_1__class_decl_dict; - tmp_key_name_2 = mod_consts[139]; - tmp_metaclass_name_1 = DICT_GET_ITEM_WITH_ERROR(tmp_dict_arg_name_2, tmp_key_name_2); - if (tmp_metaclass_name_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 39; - - goto try_except_handler_2; - } - goto condexpr_end_1; - condexpr_false_1:; - CHECK_OBJECT(tmp_class_creation_1__bases); - tmp_truth_name_1 = CHECK_IF_TRUE(tmp_class_creation_1__bases); - if (tmp_truth_name_1 == -1) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 39; - - goto try_except_handler_2; - } - tmp_condition_result_2 = tmp_truth_name_1 == 0 ? NUITKA_BOOL_FALSE : NUITKA_BOOL_TRUE; - if (tmp_condition_result_2 == NUITKA_BOOL_TRUE) { - goto condexpr_true_2; - } else { - goto condexpr_false_2; - } - condexpr_true_2:; - CHECK_OBJECT(tmp_class_creation_1__bases); - tmp_expression_name_2 = tmp_class_creation_1__bases; - tmp_subscript_name_1 = mod_consts[127]; - tmp_type_arg_1 = LOOKUP_SUBSCRIPT_CONST(tmp_expression_name_2, tmp_subscript_name_1, 0); - if (tmp_type_arg_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 39; - - goto try_except_handler_2; - } - tmp_metaclass_name_1 = BUILTIN_TYPE1(tmp_type_arg_1); - Py_DECREF(tmp_type_arg_1); - if (tmp_metaclass_name_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 39; - - goto try_except_handler_2; - } - goto condexpr_end_2; - condexpr_false_2:; - tmp_metaclass_name_1 = (PyObject *)&PyType_Type; - Py_INCREF(tmp_metaclass_name_1); - condexpr_end_2:; - condexpr_end_1:; - CHECK_OBJECT(tmp_class_creation_1__bases); - tmp_bases_name_1 = tmp_class_creation_1__bases; - tmp_assign_source_17 = SELECT_METACLASS(tmp_metaclass_name_1, tmp_bases_name_1); - Py_DECREF(tmp_metaclass_name_1); - if (tmp_assign_source_17 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 39; - - goto try_except_handler_2; - } - assert(tmp_class_creation_1__metaclass == NULL); - tmp_class_creation_1__metaclass = tmp_assign_source_17; - } - { - nuitka_bool tmp_condition_result_3; - PyObject *tmp_key_name_3; - PyObject *tmp_dict_arg_name_3; - tmp_key_name_3 = mod_consts[139]; - CHECK_OBJECT(tmp_class_creation_1__class_decl_dict); - tmp_dict_arg_name_3 = tmp_class_creation_1__class_decl_dict; - tmp_res = DICT_HAS_ITEM(tmp_dict_arg_name_3, tmp_key_name_3); - assert(!(tmp_res == -1)); - tmp_condition_result_3 = (tmp_res != 0) ? NUITKA_BOOL_TRUE : NUITKA_BOOL_FALSE; - if (tmp_condition_result_3 == NUITKA_BOOL_TRUE) { - goto branch_yes_1; - } else { - goto branch_no_1; - } - } - branch_yes_1:; - CHECK_OBJECT(tmp_class_creation_1__class_decl_dict); - tmp_dictdel_dict = tmp_class_creation_1__class_decl_dict; - tmp_dictdel_key = mod_consts[139]; - tmp_result = DICT_REMOVE_ITEM(tmp_dictdel_dict, tmp_dictdel_key); - if (tmp_result == false) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 39; - - goto try_except_handler_2; - } - branch_no_1:; - { - nuitka_bool tmp_condition_result_4; - PyObject *tmp_expression_name_3; - CHECK_OBJECT(tmp_class_creation_1__metaclass); - tmp_expression_name_3 = tmp_class_creation_1__metaclass; - tmp_result = HAS_ATTR_BOOL(tmp_expression_name_3, mod_consts[140]); - tmp_condition_result_4 = (tmp_result) ? NUITKA_BOOL_TRUE : NUITKA_BOOL_FALSE; - if (tmp_condition_result_4 == NUITKA_BOOL_TRUE) { - goto branch_yes_2; - } else { - goto branch_no_2; - } - } - branch_yes_2:; - { - PyObject *tmp_assign_source_18; - PyObject *tmp_called_name_1; - PyObject *tmp_expression_name_4; - PyObject *tmp_args_name_1; - PyObject *tmp_tuple_element_2; - PyObject *tmp_kwargs_name_1; - CHECK_OBJECT(tmp_class_creation_1__metaclass); - tmp_expression_name_4 = tmp_class_creation_1__metaclass; - tmp_called_name_1 = LOOKUP_ATTRIBUTE(tmp_expression_name_4, mod_consts[140]); - if (tmp_called_name_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 39; - - goto try_except_handler_2; - } - tmp_tuple_element_2 = mod_consts[12]; - tmp_args_name_1 = PyTuple_New(2); - PyTuple_SET_ITEM0(tmp_args_name_1, 0, tmp_tuple_element_2); - CHECK_OBJECT(tmp_class_creation_1__bases); - tmp_tuple_element_2 = tmp_class_creation_1__bases; - PyTuple_SET_ITEM0(tmp_args_name_1, 1, tmp_tuple_element_2); - CHECK_OBJECT(tmp_class_creation_1__class_decl_dict); - tmp_kwargs_name_1 = tmp_class_creation_1__class_decl_dict; - frame_705bf4315d2d4f531dff5d3d03b1beec->m_frame.f_lineno = 39; - tmp_assign_source_18 = CALL_FUNCTION(tmp_called_name_1, tmp_args_name_1, tmp_kwargs_name_1); - Py_DECREF(tmp_called_name_1); - Py_DECREF(tmp_args_name_1); - if (tmp_assign_source_18 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 39; - - goto try_except_handler_2; - } - assert(tmp_class_creation_1__prepared == NULL); - tmp_class_creation_1__prepared = tmp_assign_source_18; - } - { - nuitka_bool tmp_condition_result_5; - PyObject *tmp_operand_name_1; - PyObject *tmp_expression_name_5; - CHECK_OBJECT(tmp_class_creation_1__prepared); - tmp_expression_name_5 = tmp_class_creation_1__prepared; - tmp_result = HAS_ATTR_BOOL(tmp_expression_name_5, mod_consts[141]); - tmp_operand_name_1 = (tmp_result) ? Py_True : Py_False; - tmp_res = CHECK_IF_TRUE(tmp_operand_name_1); - if (tmp_res == -1) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 39; - - goto try_except_handler_2; - } - tmp_condition_result_5 = (tmp_res == 0) ? NUITKA_BOOL_TRUE : NUITKA_BOOL_FALSE; - if (tmp_condition_result_5 == NUITKA_BOOL_TRUE) { - goto branch_yes_3; - } else { - goto branch_no_3; - } - } - branch_yes_3:; - { - PyObject *tmp_raise_type_1; - PyObject *tmp_raise_value_1; - PyObject *tmp_left_name_1; - PyObject *tmp_right_name_1; - PyObject *tmp_tuple_element_3; - PyObject *tmp_getattr_target_1; - PyObject *tmp_getattr_attr_1; - PyObject *tmp_getattr_default_1; - tmp_raise_type_1 = PyExc_TypeError; - tmp_left_name_1 = mod_consts[142]; - CHECK_OBJECT(tmp_class_creation_1__metaclass); - tmp_getattr_target_1 = tmp_class_creation_1__metaclass; - tmp_getattr_attr_1 = mod_consts[143]; - tmp_getattr_default_1 = mod_consts[144]; - tmp_tuple_element_3 = BUILTIN_GETATTR(tmp_getattr_target_1, tmp_getattr_attr_1, tmp_getattr_default_1); - if (tmp_tuple_element_3 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 39; - - goto try_except_handler_2; - } - tmp_right_name_1 = PyTuple_New(2); - { - PyObject *tmp_expression_name_6; - PyObject *tmp_type_arg_2; - PyTuple_SET_ITEM(tmp_right_name_1, 0, tmp_tuple_element_3); - CHECK_OBJECT(tmp_class_creation_1__prepared); - tmp_type_arg_2 = tmp_class_creation_1__prepared; - tmp_expression_name_6 = BUILTIN_TYPE1(tmp_type_arg_2); - assert(!(tmp_expression_name_6 == NULL)); - tmp_tuple_element_3 = LOOKUP_ATTRIBUTE(tmp_expression_name_6, mod_consts[143]); - Py_DECREF(tmp_expression_name_6); - if (tmp_tuple_element_3 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 39; - - goto tuple_build_exception_1; - } - PyTuple_SET_ITEM(tmp_right_name_1, 1, tmp_tuple_element_3); - } - goto tuple_build_noexception_1; - // Exception handling pass through code for tuple_build: - tuple_build_exception_1:; - Py_DECREF(tmp_right_name_1); - goto try_except_handler_2; - // Finished with no exception for tuple_build: - tuple_build_noexception_1:; - tmp_raise_value_1 = BINARY_OPERATION_MOD_OBJECT_UNICODE_TUPLE(tmp_left_name_1, tmp_right_name_1); - Py_DECREF(tmp_right_name_1); - if (tmp_raise_value_1 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 39; - - goto try_except_handler_2; - } - exception_type = tmp_raise_type_1; - Py_INCREF(tmp_raise_type_1); - exception_value = tmp_raise_value_1; - exception_lineno = 39; - RAISE_EXCEPTION_IMPLICIT(&exception_type, &exception_value, &exception_tb); - - goto try_except_handler_2; - } - branch_no_3:; - goto branch_end_2; - branch_no_2:; - { - PyObject *tmp_assign_source_19; - tmp_assign_source_19 = PyDict_New(); - assert(tmp_class_creation_1__prepared == NULL); - tmp_class_creation_1__prepared = tmp_assign_source_19; - } - branch_end_2:; - { - PyObject *tmp_assign_source_20; - { - PyObject *tmp_set_locals_1; - CHECK_OBJECT(tmp_class_creation_1__prepared); - tmp_set_locals_1 = tmp_class_creation_1__prepared; - locals_models$unet3d$losses$$$class__1__MaskingLossWrapper_39 = tmp_set_locals_1; - Py_INCREF(tmp_set_locals_1); - } - // Tried code: - // Tried code: - tmp_dictset_value = GET_STRING_DICT_VALUE(moduledict_models$unet3d$losses, (Nuitka_StringObject *)mod_consts[143]); - - if (unlikely(tmp_dictset_value == NULL)) { - tmp_dictset_value = GET_MODULE_VARIABLE_VALUE_FALLBACK(mod_consts[143]); - } - - assert(!(tmp_dictset_value == NULL)); - tmp_res = PyObject_SetItem(locals_models$unet3d$losses$$$class__1__MaskingLossWrapper_39, mod_consts[145], tmp_dictset_value); - if (tmp_res != 0) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 39; - - goto try_except_handler_4; - } - tmp_dictset_value = mod_consts[146]; - tmp_res = PyObject_SetItem(locals_models$unet3d$losses$$$class__1__MaskingLossWrapper_39, mod_consts[121], tmp_dictset_value); - if (tmp_res != 0) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 39; - - goto try_except_handler_4; - } - tmp_dictset_value = mod_consts[12]; - tmp_res = PyObject_SetItem(locals_models$unet3d$losses$$$class__1__MaskingLossWrapper_39, mod_consts[147], tmp_dictset_value); - if (tmp_res != 0) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 39; - - goto try_except_handler_4; - } - if (isFrameUnusable(cache_frame_653cd49c73152390d2f5ad682e34a196_2)) { - Py_XDECREF(cache_frame_653cd49c73152390d2f5ad682e34a196_2); - -#if _DEBUG_REFCOUNTS - if (cache_frame_653cd49c73152390d2f5ad682e34a196_2 == NULL) { - count_active_frame_cache_instances += 1; - } else { - count_released_frame_cache_instances += 1; - } - count_allocated_frame_cache_instances += 1; -#endif - cache_frame_653cd49c73152390d2f5ad682e34a196_2 = MAKE_FUNCTION_FRAME(codeobj_653cd49c73152390d2f5ad682e34a196, module_models$unet3d$losses, sizeof(void *)); -#if _DEBUG_REFCOUNTS - } else { - count_hit_frame_cache_instances += 1; -#endif - } - assert(cache_frame_653cd49c73152390d2f5ad682e34a196_2->m_type_description == NULL); - frame_653cd49c73152390d2f5ad682e34a196_2 = cache_frame_653cd49c73152390d2f5ad682e34a196_2; - - // Push the new frame as the currently active one. - pushFrameStack(frame_653cd49c73152390d2f5ad682e34a196_2); - - // Mark the frame object as in use, ref count 1 will be up for reuse. - assert(Py_REFCNT(frame_653cd49c73152390d2f5ad682e34a196_2) == 2); // Frame stack - - // Framed code: - - - tmp_dictset_value = MAKE_FUNCTION_models$unet3d$losses$$$function__2___init__(); - - tmp_res = PyObject_SetItem(locals_models$unet3d$losses$$$class__1__MaskingLossWrapper_39, mod_consts[13], tmp_dictset_value); - Py_DECREF(tmp_dictset_value); - if (tmp_res != 0) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 44; - type_description_2 = "o"; - goto frame_exception_exit_2; - } - - - tmp_dictset_value = MAKE_FUNCTION_models$unet3d$losses$$$function__3_forward(); - - tmp_res = PyObject_SetItem(locals_models$unet3d$losses$$$class__1__MaskingLossWrapper_39, mod_consts[82], tmp_dictset_value); - Py_DECREF(tmp_dictset_value); - if (tmp_res != 0) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 50; - type_description_2 = "o"; - goto frame_exception_exit_2; - } - -#if 0 - RESTORE_FRAME_EXCEPTION(frame_653cd49c73152390d2f5ad682e34a196_2); -#endif - - // Put the previous frame back on top. - popFrameStack(); - - goto frame_no_exception_1; - - frame_exception_exit_2:; - -#if 0 - RESTORE_FRAME_EXCEPTION(frame_653cd49c73152390d2f5ad682e34a196_2); -#endif - - if (exception_tb == NULL) { - exception_tb = MAKE_TRACEBACK(frame_653cd49c73152390d2f5ad682e34a196_2, exception_lineno); - } else if (exception_tb->tb_frame != &frame_653cd49c73152390d2f5ad682e34a196_2->m_frame) { - exception_tb = ADD_TRACEBACK(exception_tb, frame_653cd49c73152390d2f5ad682e34a196_2, exception_lineno); - } - - // Attaches locals to frame if any. - Nuitka_Frame_AttachLocals( - frame_653cd49c73152390d2f5ad682e34a196_2, - type_description_2, - outline_0_var___class__ - ); - - - // Release cached frame if used for exception. - if (frame_653cd49c73152390d2f5ad682e34a196_2 == cache_frame_653cd49c73152390d2f5ad682e34a196_2) { -#if _DEBUG_REFCOUNTS - count_active_frame_cache_instances -= 1; - count_released_frame_cache_instances += 1; -#endif - - Py_DECREF(cache_frame_653cd49c73152390d2f5ad682e34a196_2); - cache_frame_653cd49c73152390d2f5ad682e34a196_2 = NULL; - } - - assertFrameObject(frame_653cd49c73152390d2f5ad682e34a196_2); - - // Put the previous frame back on top. - popFrameStack(); - - // Return the error. - goto nested_frame_exit_1; - - frame_no_exception_1:; - goto skip_nested_handling_1; - nested_frame_exit_1:; - - goto try_except_handler_4; - skip_nested_handling_1:; - { - nuitka_bool tmp_condition_result_6; - PyObject *tmp_compexpr_left_1; - PyObject *tmp_compexpr_right_1; - CHECK_OBJECT(tmp_class_creation_1__bases); - tmp_compexpr_left_1 = tmp_class_creation_1__bases; - CHECK_OBJECT(tmp_class_creation_1__bases_orig); - tmp_compexpr_right_1 = tmp_class_creation_1__bases_orig; - tmp_condition_result_6 = RICH_COMPARE_NE_NBOOL_OBJECT_TUPLE(tmp_compexpr_left_1, tmp_compexpr_right_1); - if (tmp_condition_result_6 == NUITKA_BOOL_EXCEPTION) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 39; - - goto try_except_handler_4; - } - if (tmp_condition_result_6 == NUITKA_BOOL_TRUE) { - goto branch_yes_4; - } else { - goto branch_no_4; - } - assert(tmp_condition_result_6 != NUITKA_BOOL_UNASSIGNED); - } - branch_yes_4:; - CHECK_OBJECT(tmp_class_creation_1__bases_orig); - tmp_dictset_value = tmp_class_creation_1__bases_orig; - tmp_res = PyObject_SetItem(locals_models$unet3d$losses$$$class__1__MaskingLossWrapper_39, mod_consts[150], tmp_dictset_value); - if (tmp_res != 0) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 39; - - goto try_except_handler_4; - } - branch_no_4:; - { - PyObject *tmp_assign_source_21; - PyObject *tmp_called_name_2; - PyObject *tmp_args_name_2; - PyObject *tmp_tuple_element_4; - PyObject *tmp_kwargs_name_2; - CHECK_OBJECT(tmp_class_creation_1__metaclass); - tmp_called_name_2 = tmp_class_creation_1__metaclass; - tmp_tuple_element_4 = mod_consts[12]; - tmp_args_name_2 = PyTuple_New(3); - PyTuple_SET_ITEM0(tmp_args_name_2, 0, tmp_tuple_element_4); - CHECK_OBJECT(tmp_class_creation_1__bases); - tmp_tuple_element_4 = tmp_class_creation_1__bases; - PyTuple_SET_ITEM0(tmp_args_name_2, 1, tmp_tuple_element_4); - tmp_tuple_element_4 = locals_models$unet3d$losses$$$class__1__MaskingLossWrapper_39; - PyTuple_SET_ITEM0(tmp_args_name_2, 2, tmp_tuple_element_4); - CHECK_OBJECT(tmp_class_creation_1__class_decl_dict); - tmp_kwargs_name_2 = tmp_class_creation_1__class_decl_dict; - frame_705bf4315d2d4f531dff5d3d03b1beec->m_frame.f_lineno = 39; - tmp_assign_source_21 = CALL_FUNCTION(tmp_called_name_2, tmp_args_name_2, tmp_kwargs_name_2); - Py_DECREF(tmp_args_name_2); - if (tmp_assign_source_21 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 39; - - goto try_except_handler_4; - } - assert(outline_0_var___class__ == NULL); - outline_0_var___class__ = tmp_assign_source_21; - } - CHECK_OBJECT(outline_0_var___class__); - tmp_assign_source_20 = outline_0_var___class__; - Py_INCREF(tmp_assign_source_20); - goto try_return_handler_4; - NUITKA_CANNOT_GET_HERE("tried codes exits in all cases"); - return NULL; - // Return handler code: - try_return_handler_4:; - Py_DECREF(locals_models$unet3d$losses$$$class__1__MaskingLossWrapper_39); - locals_models$unet3d$losses$$$class__1__MaskingLossWrapper_39 = NULL; - goto try_return_handler_3; - // Exception handler code: - try_except_handler_4:; - exception_keeper_type_2 = exception_type; - exception_keeper_value_2 = exception_value; - exception_keeper_tb_2 = exception_tb; - exception_keeper_lineno_2 = exception_lineno; - exception_type = NULL; - exception_value = NULL; - exception_tb = NULL; - exception_lineno = 0; - - Py_DECREF(locals_models$unet3d$losses$$$class__1__MaskingLossWrapper_39); - locals_models$unet3d$losses$$$class__1__MaskingLossWrapper_39 = NULL; - // Re-raise. - exception_type = exception_keeper_type_2; - exception_value = exception_keeper_value_2; - exception_tb = exception_keeper_tb_2; - exception_lineno = exception_keeper_lineno_2; - - goto try_except_handler_3; - // End of try: - NUITKA_CANNOT_GET_HERE("tried codes exits in all cases"); - return NULL; - // Return handler code: - try_return_handler_3:; - CHECK_OBJECT(outline_0_var___class__); - Py_DECREF(outline_0_var___class__); - outline_0_var___class__ = NULL; - goto outline_result_1; - // Exception handler code: - try_except_handler_3:; - exception_keeper_type_3 = exception_type; - exception_keeper_value_3 = exception_value; - exception_keeper_tb_3 = exception_tb; - exception_keeper_lineno_3 = exception_lineno; - exception_type = NULL; - exception_value = NULL; - exception_tb = NULL; - exception_lineno = 0; - - // Re-raise. - exception_type = exception_keeper_type_3; - exception_value = exception_keeper_value_3; - exception_tb = exception_keeper_tb_3; - exception_lineno = exception_keeper_lineno_3; - - goto outline_exception_1; - // End of try: - NUITKA_CANNOT_GET_HERE("Return statement must have exited already."); - return NULL; - outline_exception_1:; - exception_lineno = 39; - goto try_except_handler_2; - outline_result_1:; - UPDATE_STRING_DICT1(moduledict_models$unet3d$losses, (Nuitka_StringObject *)mod_consts[12], tmp_assign_source_20); - } - goto try_end_2; - // Exception handler code: - try_except_handler_2:; - exception_keeper_type_4 = exception_type; - exception_keeper_value_4 = exception_value; - exception_keeper_tb_4 = exception_tb; - exception_keeper_lineno_4 = exception_lineno; - exception_type = NULL; - exception_value = NULL; - exception_tb = NULL; - exception_lineno = 0; - - Py_XDECREF(tmp_class_creation_1__bases_orig); - tmp_class_creation_1__bases_orig = NULL; - Py_XDECREF(tmp_class_creation_1__bases); - tmp_class_creation_1__bases = NULL; - Py_XDECREF(tmp_class_creation_1__class_decl_dict); - tmp_class_creation_1__class_decl_dict = NULL; - Py_XDECREF(tmp_class_creation_1__metaclass); - tmp_class_creation_1__metaclass = NULL; - Py_XDECREF(tmp_class_creation_1__prepared); - tmp_class_creation_1__prepared = NULL; - // Re-raise. - exception_type = exception_keeper_type_4; - exception_value = exception_keeper_value_4; - exception_tb = exception_keeper_tb_4; - exception_lineno = exception_keeper_lineno_4; - - goto frame_exception_exit_1; - // End of try: - try_end_2:; - CHECK_OBJECT(tmp_class_creation_1__bases_orig); - Py_DECREF(tmp_class_creation_1__bases_orig); - tmp_class_creation_1__bases_orig = NULL; - Py_XDECREF(tmp_class_creation_1__bases); - tmp_class_creation_1__bases = NULL; - Py_XDECREF(tmp_class_creation_1__class_decl_dict); - tmp_class_creation_1__class_decl_dict = NULL; - Py_XDECREF(tmp_class_creation_1__metaclass); - tmp_class_creation_1__metaclass = NULL; - CHECK_OBJECT(tmp_class_creation_1__prepared); - Py_DECREF(tmp_class_creation_1__prepared); - tmp_class_creation_1__prepared = NULL; - // Tried code: - { - PyObject *tmp_assign_source_22; - PyObject *tmp_tuple_element_5; - PyObject *tmp_expression_name_7; - tmp_expression_name_7 = GET_STRING_DICT_VALUE(moduledict_models$unet3d$losses, (Nuitka_StringObject *)mod_consts[36]); - - if (unlikely(tmp_expression_name_7 == NULL)) { - tmp_expression_name_7 = GET_MODULE_VARIABLE_VALUE_FALLBACK(mod_consts[36]); - } - - if (tmp_expression_name_7 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 62; - - goto try_except_handler_5; - } - tmp_tuple_element_5 = LOOKUP_ATTRIBUTE(tmp_expression_name_7, mod_consts[138]); - if (tmp_tuple_element_5 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 62; - - goto try_except_handler_5; - } - tmp_assign_source_22 = PyTuple_New(1); - PyTuple_SET_ITEM(tmp_assign_source_22, 0, tmp_tuple_element_5); - assert(tmp_class_creation_2__bases_orig == NULL); - tmp_class_creation_2__bases_orig = tmp_assign_source_22; - } - { - PyObject *tmp_assign_source_23; - PyObject *tmp_dircall_arg1_2; - CHECK_OBJECT(tmp_class_creation_2__bases_orig); - tmp_dircall_arg1_2 = tmp_class_creation_2__bases_orig; - Py_INCREF(tmp_dircall_arg1_2); - - { - PyObject *dir_call_args[] = {tmp_dircall_arg1_2}; - tmp_assign_source_23 = impl_models$$$function__1__mro_entries_conversion(dir_call_args); - } - if (tmp_assign_source_23 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 62; - - goto try_except_handler_5; - } - assert(tmp_class_creation_2__bases == NULL); - tmp_class_creation_2__bases = tmp_assign_source_23; - } - { - PyObject *tmp_assign_source_24; - tmp_assign_source_24 = PyDict_New(); - assert(tmp_class_creation_2__class_decl_dict == NULL); - tmp_class_creation_2__class_decl_dict = tmp_assign_source_24; - } - { - PyObject *tmp_assign_source_25; - PyObject *tmp_metaclass_name_2; - nuitka_bool tmp_condition_result_7; - PyObject *tmp_key_name_4; - PyObject *tmp_dict_arg_name_4; - PyObject *tmp_dict_arg_name_5; - PyObject *tmp_key_name_5; - nuitka_bool tmp_condition_result_8; - int tmp_truth_name_2; - PyObject *tmp_type_arg_3; - PyObject *tmp_expression_name_8; - PyObject *tmp_subscript_name_2; - PyObject *tmp_bases_name_2; - tmp_key_name_4 = mod_consts[139]; - CHECK_OBJECT(tmp_class_creation_2__class_decl_dict); - tmp_dict_arg_name_4 = tmp_class_creation_2__class_decl_dict; - tmp_res = DICT_HAS_ITEM(tmp_dict_arg_name_4, tmp_key_name_4); - assert(!(tmp_res == -1)); - tmp_condition_result_7 = (tmp_res != 0) ? NUITKA_BOOL_TRUE : NUITKA_BOOL_FALSE; - if (tmp_condition_result_7 == NUITKA_BOOL_TRUE) { - goto condexpr_true_3; - } else { - goto condexpr_false_3; - } - condexpr_true_3:; - CHECK_OBJECT(tmp_class_creation_2__class_decl_dict); - tmp_dict_arg_name_5 = tmp_class_creation_2__class_decl_dict; - tmp_key_name_5 = mod_consts[139]; - tmp_metaclass_name_2 = DICT_GET_ITEM_WITH_ERROR(tmp_dict_arg_name_5, tmp_key_name_5); - if (tmp_metaclass_name_2 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 62; - - goto try_except_handler_5; - } - goto condexpr_end_3; - condexpr_false_3:; - CHECK_OBJECT(tmp_class_creation_2__bases); - tmp_truth_name_2 = CHECK_IF_TRUE(tmp_class_creation_2__bases); - if (tmp_truth_name_2 == -1) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 62; - - goto try_except_handler_5; - } - tmp_condition_result_8 = tmp_truth_name_2 == 0 ? NUITKA_BOOL_FALSE : NUITKA_BOOL_TRUE; - if (tmp_condition_result_8 == NUITKA_BOOL_TRUE) { - goto condexpr_true_4; - } else { - goto condexpr_false_4; - } - condexpr_true_4:; - CHECK_OBJECT(tmp_class_creation_2__bases); - tmp_expression_name_8 = tmp_class_creation_2__bases; - tmp_subscript_name_2 = mod_consts[127]; - tmp_type_arg_3 = LOOKUP_SUBSCRIPT_CONST(tmp_expression_name_8, tmp_subscript_name_2, 0); - if (tmp_type_arg_3 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 62; - - goto try_except_handler_5; - } - tmp_metaclass_name_2 = BUILTIN_TYPE1(tmp_type_arg_3); - Py_DECREF(tmp_type_arg_3); - if (tmp_metaclass_name_2 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 62; - - goto try_except_handler_5; - } - goto condexpr_end_4; - condexpr_false_4:; - tmp_metaclass_name_2 = (PyObject *)&PyType_Type; - Py_INCREF(tmp_metaclass_name_2); - condexpr_end_4:; - condexpr_end_3:; - CHECK_OBJECT(tmp_class_creation_2__bases); - tmp_bases_name_2 = tmp_class_creation_2__bases; - tmp_assign_source_25 = SELECT_METACLASS(tmp_metaclass_name_2, tmp_bases_name_2); - Py_DECREF(tmp_metaclass_name_2); - if (tmp_assign_source_25 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 62; - - goto try_except_handler_5; - } - assert(tmp_class_creation_2__metaclass == NULL); - tmp_class_creation_2__metaclass = tmp_assign_source_25; - } - { - nuitka_bool tmp_condition_result_9; - PyObject *tmp_key_name_6; - PyObject *tmp_dict_arg_name_6; - tmp_key_name_6 = mod_consts[139]; - CHECK_OBJECT(tmp_class_creation_2__class_decl_dict); - tmp_dict_arg_name_6 = tmp_class_creation_2__class_decl_dict; - tmp_res = DICT_HAS_ITEM(tmp_dict_arg_name_6, tmp_key_name_6); - assert(!(tmp_res == -1)); - tmp_condition_result_9 = (tmp_res != 0) ? NUITKA_BOOL_TRUE : NUITKA_BOOL_FALSE; - if (tmp_condition_result_9 == NUITKA_BOOL_TRUE) { - goto branch_yes_5; - } else { - goto branch_no_5; - } - } - branch_yes_5:; - CHECK_OBJECT(tmp_class_creation_2__class_decl_dict); - tmp_dictdel_dict = tmp_class_creation_2__class_decl_dict; - tmp_dictdel_key = mod_consts[139]; - tmp_result = DICT_REMOVE_ITEM(tmp_dictdel_dict, tmp_dictdel_key); - if (tmp_result == false) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 62; - - goto try_except_handler_5; - } - branch_no_5:; - { - nuitka_bool tmp_condition_result_10; - PyObject *tmp_expression_name_9; - CHECK_OBJECT(tmp_class_creation_2__metaclass); - tmp_expression_name_9 = tmp_class_creation_2__metaclass; - tmp_result = HAS_ATTR_BOOL(tmp_expression_name_9, mod_consts[140]); - tmp_condition_result_10 = (tmp_result) ? NUITKA_BOOL_TRUE : NUITKA_BOOL_FALSE; - if (tmp_condition_result_10 == NUITKA_BOOL_TRUE) { - goto branch_yes_6; - } else { - goto branch_no_6; - } - } - branch_yes_6:; - { - PyObject *tmp_assign_source_26; - PyObject *tmp_called_name_3; - PyObject *tmp_expression_name_10; - PyObject *tmp_args_name_3; - PyObject *tmp_tuple_element_6; - PyObject *tmp_kwargs_name_3; - CHECK_OBJECT(tmp_class_creation_2__metaclass); - tmp_expression_name_10 = tmp_class_creation_2__metaclass; - tmp_called_name_3 = LOOKUP_ATTRIBUTE(tmp_expression_name_10, mod_consts[140]); - if (tmp_called_name_3 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 62; - - goto try_except_handler_5; - } - tmp_tuple_element_6 = mod_consts[22]; - tmp_args_name_3 = PyTuple_New(2); - PyTuple_SET_ITEM0(tmp_args_name_3, 0, tmp_tuple_element_6); - CHECK_OBJECT(tmp_class_creation_2__bases); - tmp_tuple_element_6 = tmp_class_creation_2__bases; - PyTuple_SET_ITEM0(tmp_args_name_3, 1, tmp_tuple_element_6); - CHECK_OBJECT(tmp_class_creation_2__class_decl_dict); - tmp_kwargs_name_3 = tmp_class_creation_2__class_decl_dict; - frame_705bf4315d2d4f531dff5d3d03b1beec->m_frame.f_lineno = 62; - tmp_assign_source_26 = CALL_FUNCTION(tmp_called_name_3, tmp_args_name_3, tmp_kwargs_name_3); - Py_DECREF(tmp_called_name_3); - Py_DECREF(tmp_args_name_3); - if (tmp_assign_source_26 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 62; - - goto try_except_handler_5; - } - assert(tmp_class_creation_2__prepared == NULL); - tmp_class_creation_2__prepared = tmp_assign_source_26; - } - { - nuitka_bool tmp_condition_result_11; - PyObject *tmp_operand_name_2; - PyObject *tmp_expression_name_11; - CHECK_OBJECT(tmp_class_creation_2__prepared); - tmp_expression_name_11 = tmp_class_creation_2__prepared; - tmp_result = HAS_ATTR_BOOL(tmp_expression_name_11, mod_consts[141]); - tmp_operand_name_2 = (tmp_result) ? Py_True : Py_False; - tmp_res = CHECK_IF_TRUE(tmp_operand_name_2); - if (tmp_res == -1) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 62; - - goto try_except_handler_5; - } - tmp_condition_result_11 = (tmp_res == 0) ? NUITKA_BOOL_TRUE : NUITKA_BOOL_FALSE; - if (tmp_condition_result_11 == NUITKA_BOOL_TRUE) { - goto branch_yes_7; - } else { - goto branch_no_7; - } - } - branch_yes_7:; - { - PyObject *tmp_raise_type_2; - PyObject *tmp_raise_value_2; - PyObject *tmp_left_name_2; - PyObject *tmp_right_name_2; - PyObject *tmp_tuple_element_7; - PyObject *tmp_getattr_target_2; - PyObject *tmp_getattr_attr_2; - PyObject *tmp_getattr_default_2; - tmp_raise_type_2 = PyExc_TypeError; - tmp_left_name_2 = mod_consts[142]; - CHECK_OBJECT(tmp_class_creation_2__metaclass); - tmp_getattr_target_2 = tmp_class_creation_2__metaclass; - tmp_getattr_attr_2 = mod_consts[143]; - tmp_getattr_default_2 = mod_consts[144]; - tmp_tuple_element_7 = BUILTIN_GETATTR(tmp_getattr_target_2, tmp_getattr_attr_2, tmp_getattr_default_2); - if (tmp_tuple_element_7 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 62; - - goto try_except_handler_5; - } - tmp_right_name_2 = PyTuple_New(2); - { - PyObject *tmp_expression_name_12; - PyObject *tmp_type_arg_4; - PyTuple_SET_ITEM(tmp_right_name_2, 0, tmp_tuple_element_7); - CHECK_OBJECT(tmp_class_creation_2__prepared); - tmp_type_arg_4 = tmp_class_creation_2__prepared; - tmp_expression_name_12 = BUILTIN_TYPE1(tmp_type_arg_4); - assert(!(tmp_expression_name_12 == NULL)); - tmp_tuple_element_7 = LOOKUP_ATTRIBUTE(tmp_expression_name_12, mod_consts[143]); - Py_DECREF(tmp_expression_name_12); - if (tmp_tuple_element_7 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 62; - - goto tuple_build_exception_2; - } - PyTuple_SET_ITEM(tmp_right_name_2, 1, tmp_tuple_element_7); - } - goto tuple_build_noexception_2; - // Exception handling pass through code for tuple_build: - tuple_build_exception_2:; - Py_DECREF(tmp_right_name_2); - goto try_except_handler_5; - // Finished with no exception for tuple_build: - tuple_build_noexception_2:; - tmp_raise_value_2 = BINARY_OPERATION_MOD_OBJECT_UNICODE_TUPLE(tmp_left_name_2, tmp_right_name_2); - Py_DECREF(tmp_right_name_2); - if (tmp_raise_value_2 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 62; - - goto try_except_handler_5; - } - exception_type = tmp_raise_type_2; - Py_INCREF(tmp_raise_type_2); - exception_value = tmp_raise_value_2; - exception_lineno = 62; - RAISE_EXCEPTION_IMPLICIT(&exception_type, &exception_value, &exception_tb); - - goto try_except_handler_5; - } - branch_no_7:; - goto branch_end_6; - branch_no_6:; - { - PyObject *tmp_assign_source_27; - tmp_assign_source_27 = PyDict_New(); - assert(tmp_class_creation_2__prepared == NULL); - tmp_class_creation_2__prepared = tmp_assign_source_27; - } - branch_end_6:; - { - PyObject *tmp_assign_source_28; - { - PyObject *tmp_set_locals_2; - CHECK_OBJECT(tmp_class_creation_2__prepared); - tmp_set_locals_2 = tmp_class_creation_2__prepared; - locals_models$unet3d$losses$$$class__2_SkipLastTargetChannelWrapper_62 = tmp_set_locals_2; - Py_INCREF(tmp_set_locals_2); - } - // Tried code: - // Tried code: - tmp_dictset_value = GET_STRING_DICT_VALUE(moduledict_models$unet3d$losses, (Nuitka_StringObject *)mod_consts[143]); - - if (unlikely(tmp_dictset_value == NULL)) { - tmp_dictset_value = GET_MODULE_VARIABLE_VALUE_FALLBACK(mod_consts[143]); - } - - assert(!(tmp_dictset_value == NULL)); - tmp_res = PyObject_SetItem(locals_models$unet3d$losses$$$class__2_SkipLastTargetChannelWrapper_62, mod_consts[145], tmp_dictset_value); - if (tmp_res != 0) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 62; - - goto try_except_handler_7; - } - tmp_dictset_value = mod_consts[151]; - tmp_res = PyObject_SetItem(locals_models$unet3d$losses$$$class__2_SkipLastTargetChannelWrapper_62, mod_consts[121], tmp_dictset_value); - if (tmp_res != 0) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 62; - - goto try_except_handler_7; - } - tmp_dictset_value = mod_consts[22]; - tmp_res = PyObject_SetItem(locals_models$unet3d$losses$$$class__2_SkipLastTargetChannelWrapper_62, mod_consts[147], tmp_dictset_value); - if (tmp_res != 0) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 62; - - goto try_except_handler_7; - } - if (isFrameUnusable(cache_frame_102f6d9c8caf3c07fcacb9b74c819b61_3)) { - Py_XDECREF(cache_frame_102f6d9c8caf3c07fcacb9b74c819b61_3); - -#if _DEBUG_REFCOUNTS - if (cache_frame_102f6d9c8caf3c07fcacb9b74c819b61_3 == NULL) { - count_active_frame_cache_instances += 1; - } else { - count_released_frame_cache_instances += 1; - } - count_allocated_frame_cache_instances += 1; -#endif - cache_frame_102f6d9c8caf3c07fcacb9b74c819b61_3 = MAKE_FUNCTION_FRAME(codeobj_102f6d9c8caf3c07fcacb9b74c819b61, module_models$unet3d$losses, sizeof(void *)); -#if _DEBUG_REFCOUNTS - } else { - count_hit_frame_cache_instances += 1; -#endif - } - assert(cache_frame_102f6d9c8caf3c07fcacb9b74c819b61_3->m_type_description == NULL); - frame_102f6d9c8caf3c07fcacb9b74c819b61_3 = cache_frame_102f6d9c8caf3c07fcacb9b74c819b61_3; - - // Push the new frame as the currently active one. - pushFrameStack(frame_102f6d9c8caf3c07fcacb9b74c819b61_3); - - // Mark the frame object as in use, ref count 1 will be up for reuse. - assert(Py_REFCNT(frame_102f6d9c8caf3c07fcacb9b74c819b61_3) == 2); // Frame stack - - // Framed code: - { - PyObject *tmp_defaults_2; - tmp_defaults_2 = mod_consts[152]; - Py_INCREF(tmp_defaults_2); - - - tmp_dictset_value = MAKE_FUNCTION_models$unet3d$losses$$$function__4___init__(tmp_defaults_2); - - tmp_res = PyObject_SetItem(locals_models$unet3d$losses$$$class__2_SkipLastTargetChannelWrapper_62, mod_consts[13], tmp_dictset_value); - Py_DECREF(tmp_dictset_value); - if (tmp_res != 0) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 67; - type_description_2 = "o"; - goto frame_exception_exit_3; - } - } - - - tmp_dictset_value = MAKE_FUNCTION_models$unet3d$losses$$$function__5_forward(); - - tmp_res = PyObject_SetItem(locals_models$unet3d$losses$$$class__2_SkipLastTargetChannelWrapper_62, mod_consts[82], tmp_dictset_value); - Py_DECREF(tmp_dictset_value); - if (tmp_res != 0) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 72; - type_description_2 = "o"; - goto frame_exception_exit_3; - } - -#if 0 - RESTORE_FRAME_EXCEPTION(frame_102f6d9c8caf3c07fcacb9b74c819b61_3); -#endif - - // Put the previous frame back on top. - popFrameStack(); - - goto frame_no_exception_2; - - frame_exception_exit_3:; - -#if 0 - RESTORE_FRAME_EXCEPTION(frame_102f6d9c8caf3c07fcacb9b74c819b61_3); -#endif - - if (exception_tb == NULL) { - exception_tb = MAKE_TRACEBACK(frame_102f6d9c8caf3c07fcacb9b74c819b61_3, exception_lineno); - } else if (exception_tb->tb_frame != &frame_102f6d9c8caf3c07fcacb9b74c819b61_3->m_frame) { - exception_tb = ADD_TRACEBACK(exception_tb, frame_102f6d9c8caf3c07fcacb9b74c819b61_3, exception_lineno); - } - - // Attaches locals to frame if any. - Nuitka_Frame_AttachLocals( - frame_102f6d9c8caf3c07fcacb9b74c819b61_3, - type_description_2, - outline_1_var___class__ - ); - - - // Release cached frame if used for exception. - if (frame_102f6d9c8caf3c07fcacb9b74c819b61_3 == cache_frame_102f6d9c8caf3c07fcacb9b74c819b61_3) { -#if _DEBUG_REFCOUNTS - count_active_frame_cache_instances -= 1; - count_released_frame_cache_instances += 1; -#endif - - Py_DECREF(cache_frame_102f6d9c8caf3c07fcacb9b74c819b61_3); - cache_frame_102f6d9c8caf3c07fcacb9b74c819b61_3 = NULL; - } - - assertFrameObject(frame_102f6d9c8caf3c07fcacb9b74c819b61_3); - - // Put the previous frame back on top. - popFrameStack(); - - // Return the error. - goto nested_frame_exit_2; - - frame_no_exception_2:; - goto skip_nested_handling_2; - nested_frame_exit_2:; - - goto try_except_handler_7; - skip_nested_handling_2:; - { - nuitka_bool tmp_condition_result_12; - PyObject *tmp_compexpr_left_2; - PyObject *tmp_compexpr_right_2; - CHECK_OBJECT(tmp_class_creation_2__bases); - tmp_compexpr_left_2 = tmp_class_creation_2__bases; - CHECK_OBJECT(tmp_class_creation_2__bases_orig); - tmp_compexpr_right_2 = tmp_class_creation_2__bases_orig; - tmp_condition_result_12 = RICH_COMPARE_NE_NBOOL_OBJECT_TUPLE(tmp_compexpr_left_2, tmp_compexpr_right_2); - if (tmp_condition_result_12 == NUITKA_BOOL_EXCEPTION) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 62; - - goto try_except_handler_7; - } - if (tmp_condition_result_12 == NUITKA_BOOL_TRUE) { - goto branch_yes_8; - } else { - goto branch_no_8; - } - assert(tmp_condition_result_12 != NUITKA_BOOL_UNASSIGNED); - } - branch_yes_8:; - CHECK_OBJECT(tmp_class_creation_2__bases_orig); - tmp_dictset_value = tmp_class_creation_2__bases_orig; - tmp_res = PyObject_SetItem(locals_models$unet3d$losses$$$class__2_SkipLastTargetChannelWrapper_62, mod_consts[150], tmp_dictset_value); - if (tmp_res != 0) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 62; - - goto try_except_handler_7; - } - branch_no_8:; - { - PyObject *tmp_assign_source_29; - PyObject *tmp_called_name_4; - PyObject *tmp_args_name_4; - PyObject *tmp_tuple_element_8; - PyObject *tmp_kwargs_name_4; - CHECK_OBJECT(tmp_class_creation_2__metaclass); - tmp_called_name_4 = tmp_class_creation_2__metaclass; - tmp_tuple_element_8 = mod_consts[22]; - tmp_args_name_4 = PyTuple_New(3); - PyTuple_SET_ITEM0(tmp_args_name_4, 0, tmp_tuple_element_8); - CHECK_OBJECT(tmp_class_creation_2__bases); - tmp_tuple_element_8 = tmp_class_creation_2__bases; - PyTuple_SET_ITEM0(tmp_args_name_4, 1, tmp_tuple_element_8); - tmp_tuple_element_8 = locals_models$unet3d$losses$$$class__2_SkipLastTargetChannelWrapper_62; - PyTuple_SET_ITEM0(tmp_args_name_4, 2, tmp_tuple_element_8); - CHECK_OBJECT(tmp_class_creation_2__class_decl_dict); - tmp_kwargs_name_4 = tmp_class_creation_2__class_decl_dict; - frame_705bf4315d2d4f531dff5d3d03b1beec->m_frame.f_lineno = 62; - tmp_assign_source_29 = CALL_FUNCTION(tmp_called_name_4, tmp_args_name_4, tmp_kwargs_name_4); - Py_DECREF(tmp_args_name_4); - if (tmp_assign_source_29 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 62; - - goto try_except_handler_7; - } - assert(outline_1_var___class__ == NULL); - outline_1_var___class__ = tmp_assign_source_29; - } - CHECK_OBJECT(outline_1_var___class__); - tmp_assign_source_28 = outline_1_var___class__; - Py_INCREF(tmp_assign_source_28); - goto try_return_handler_7; - NUITKA_CANNOT_GET_HERE("tried codes exits in all cases"); - return NULL; - // Return handler code: - try_return_handler_7:; - Py_DECREF(locals_models$unet3d$losses$$$class__2_SkipLastTargetChannelWrapper_62); - locals_models$unet3d$losses$$$class__2_SkipLastTargetChannelWrapper_62 = NULL; - goto try_return_handler_6; - // Exception handler code: - try_except_handler_7:; - exception_keeper_type_5 = exception_type; - exception_keeper_value_5 = exception_value; - exception_keeper_tb_5 = exception_tb; - exception_keeper_lineno_5 = exception_lineno; - exception_type = NULL; - exception_value = NULL; - exception_tb = NULL; - exception_lineno = 0; - - Py_DECREF(locals_models$unet3d$losses$$$class__2_SkipLastTargetChannelWrapper_62); - locals_models$unet3d$losses$$$class__2_SkipLastTargetChannelWrapper_62 = NULL; - // Re-raise. - exception_type = exception_keeper_type_5; - exception_value = exception_keeper_value_5; - exception_tb = exception_keeper_tb_5; - exception_lineno = exception_keeper_lineno_5; - - goto try_except_handler_6; - // End of try: - NUITKA_CANNOT_GET_HERE("tried codes exits in all cases"); - return NULL; - // Return handler code: - try_return_handler_6:; - CHECK_OBJECT(outline_1_var___class__); - Py_DECREF(outline_1_var___class__); - outline_1_var___class__ = NULL; - goto outline_result_2; - // Exception handler code: - try_except_handler_6:; - exception_keeper_type_6 = exception_type; - exception_keeper_value_6 = exception_value; - exception_keeper_tb_6 = exception_tb; - exception_keeper_lineno_6 = exception_lineno; - exception_type = NULL; - exception_value = NULL; - exception_tb = NULL; - exception_lineno = 0; - - // Re-raise. - exception_type = exception_keeper_type_6; - exception_value = exception_keeper_value_6; - exception_tb = exception_keeper_tb_6; - exception_lineno = exception_keeper_lineno_6; - - goto outline_exception_2; - // End of try: - NUITKA_CANNOT_GET_HERE("Return statement must have exited already."); - return NULL; - outline_exception_2:; - exception_lineno = 62; - goto try_except_handler_5; - outline_result_2:; - UPDATE_STRING_DICT1(moduledict_models$unet3d$losses, (Nuitka_StringObject *)mod_consts[22], tmp_assign_source_28); - } - goto try_end_3; - // Exception handler code: - try_except_handler_5:; - exception_keeper_type_7 = exception_type; - exception_keeper_value_7 = exception_value; - exception_keeper_tb_7 = exception_tb; - exception_keeper_lineno_7 = exception_lineno; - exception_type = NULL; - exception_value = NULL; - exception_tb = NULL; - exception_lineno = 0; - - Py_XDECREF(tmp_class_creation_2__bases_orig); - tmp_class_creation_2__bases_orig = NULL; - Py_XDECREF(tmp_class_creation_2__bases); - tmp_class_creation_2__bases = NULL; - Py_XDECREF(tmp_class_creation_2__class_decl_dict); - tmp_class_creation_2__class_decl_dict = NULL; - Py_XDECREF(tmp_class_creation_2__metaclass); - tmp_class_creation_2__metaclass = NULL; - Py_XDECREF(tmp_class_creation_2__prepared); - tmp_class_creation_2__prepared = NULL; - // Re-raise. - exception_type = exception_keeper_type_7; - exception_value = exception_keeper_value_7; - exception_tb = exception_keeper_tb_7; - exception_lineno = exception_keeper_lineno_7; - - goto frame_exception_exit_1; - // End of try: - try_end_3:; - CHECK_OBJECT(tmp_class_creation_2__bases_orig); - Py_DECREF(tmp_class_creation_2__bases_orig); - tmp_class_creation_2__bases_orig = NULL; - Py_XDECREF(tmp_class_creation_2__bases); - tmp_class_creation_2__bases = NULL; - Py_XDECREF(tmp_class_creation_2__class_decl_dict); - tmp_class_creation_2__class_decl_dict = NULL; - Py_XDECREF(tmp_class_creation_2__metaclass); - tmp_class_creation_2__metaclass = NULL; - CHECK_OBJECT(tmp_class_creation_2__prepared); - Py_DECREF(tmp_class_creation_2__prepared); - tmp_class_creation_2__prepared = NULL; - // Tried code: - { - PyObject *tmp_assign_source_30; - PyObject *tmp_tuple_element_9; - PyObject *tmp_expression_name_13; - tmp_expression_name_13 = GET_STRING_DICT_VALUE(moduledict_models$unet3d$losses, (Nuitka_StringObject *)mod_consts[36]); - - if (unlikely(tmp_expression_name_13 == NULL)) { - tmp_expression_name_13 = GET_MODULE_VARIABLE_VALUE_FALLBACK(mod_consts[36]); - } - - if (tmp_expression_name_13 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 84; - - goto try_except_handler_8; - } - tmp_tuple_element_9 = LOOKUP_ATTRIBUTE(tmp_expression_name_13, mod_consts[138]); - if (tmp_tuple_element_9 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 84; - - goto try_except_handler_8; - } - tmp_assign_source_30 = PyTuple_New(1); - PyTuple_SET_ITEM(tmp_assign_source_30, 0, tmp_tuple_element_9); - assert(tmp_class_creation_3__bases_orig == NULL); - tmp_class_creation_3__bases_orig = tmp_assign_source_30; - } - { - PyObject *tmp_assign_source_31; - PyObject *tmp_dircall_arg1_3; - CHECK_OBJECT(tmp_class_creation_3__bases_orig); - tmp_dircall_arg1_3 = tmp_class_creation_3__bases_orig; - Py_INCREF(tmp_dircall_arg1_3); - - { - PyObject *dir_call_args[] = {tmp_dircall_arg1_3}; - tmp_assign_source_31 = impl_models$$$function__1__mro_entries_conversion(dir_call_args); - } - if (tmp_assign_source_31 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 84; - - goto try_except_handler_8; - } - assert(tmp_class_creation_3__bases == NULL); - tmp_class_creation_3__bases = tmp_assign_source_31; - } - { - PyObject *tmp_assign_source_32; - tmp_assign_source_32 = PyDict_New(); - assert(tmp_class_creation_3__class_decl_dict == NULL); - tmp_class_creation_3__class_decl_dict = tmp_assign_source_32; - } - { - PyObject *tmp_assign_source_33; - PyObject *tmp_metaclass_name_3; - nuitka_bool tmp_condition_result_13; - PyObject *tmp_key_name_7; - PyObject *tmp_dict_arg_name_7; - PyObject *tmp_dict_arg_name_8; - PyObject *tmp_key_name_8; - nuitka_bool tmp_condition_result_14; - int tmp_truth_name_3; - PyObject *tmp_type_arg_5; - PyObject *tmp_expression_name_14; - PyObject *tmp_subscript_name_3; - PyObject *tmp_bases_name_3; - tmp_key_name_7 = mod_consts[139]; - CHECK_OBJECT(tmp_class_creation_3__class_decl_dict); - tmp_dict_arg_name_7 = tmp_class_creation_3__class_decl_dict; - tmp_res = DICT_HAS_ITEM(tmp_dict_arg_name_7, tmp_key_name_7); - assert(!(tmp_res == -1)); - tmp_condition_result_13 = (tmp_res != 0) ? NUITKA_BOOL_TRUE : NUITKA_BOOL_FALSE; - if (tmp_condition_result_13 == NUITKA_BOOL_TRUE) { - goto condexpr_true_5; - } else { - goto condexpr_false_5; - } - condexpr_true_5:; - CHECK_OBJECT(tmp_class_creation_3__class_decl_dict); - tmp_dict_arg_name_8 = tmp_class_creation_3__class_decl_dict; - tmp_key_name_8 = mod_consts[139]; - tmp_metaclass_name_3 = DICT_GET_ITEM_WITH_ERROR(tmp_dict_arg_name_8, tmp_key_name_8); - if (tmp_metaclass_name_3 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 84; - - goto try_except_handler_8; - } - goto condexpr_end_5; - condexpr_false_5:; - CHECK_OBJECT(tmp_class_creation_3__bases); - tmp_truth_name_3 = CHECK_IF_TRUE(tmp_class_creation_3__bases); - if (tmp_truth_name_3 == -1) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 84; - - goto try_except_handler_8; - } - tmp_condition_result_14 = tmp_truth_name_3 == 0 ? NUITKA_BOOL_FALSE : NUITKA_BOOL_TRUE; - if (tmp_condition_result_14 == NUITKA_BOOL_TRUE) { - goto condexpr_true_6; - } else { - goto condexpr_false_6; - } - condexpr_true_6:; - CHECK_OBJECT(tmp_class_creation_3__bases); - tmp_expression_name_14 = tmp_class_creation_3__bases; - tmp_subscript_name_3 = mod_consts[127]; - tmp_type_arg_5 = LOOKUP_SUBSCRIPT_CONST(tmp_expression_name_14, tmp_subscript_name_3, 0); - if (tmp_type_arg_5 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 84; - - goto try_except_handler_8; - } - tmp_metaclass_name_3 = BUILTIN_TYPE1(tmp_type_arg_5); - Py_DECREF(tmp_type_arg_5); - if (tmp_metaclass_name_3 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 84; - - goto try_except_handler_8; - } - goto condexpr_end_6; - condexpr_false_6:; - tmp_metaclass_name_3 = (PyObject *)&PyType_Type; - Py_INCREF(tmp_metaclass_name_3); - condexpr_end_6:; - condexpr_end_5:; - CHECK_OBJECT(tmp_class_creation_3__bases); - tmp_bases_name_3 = tmp_class_creation_3__bases; - tmp_assign_source_33 = SELECT_METACLASS(tmp_metaclass_name_3, tmp_bases_name_3); - Py_DECREF(tmp_metaclass_name_3); - if (tmp_assign_source_33 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 84; - - goto try_except_handler_8; - } - assert(tmp_class_creation_3__metaclass == NULL); - tmp_class_creation_3__metaclass = tmp_assign_source_33; - } - { - nuitka_bool tmp_condition_result_15; - PyObject *tmp_key_name_9; - PyObject *tmp_dict_arg_name_9; - tmp_key_name_9 = mod_consts[139]; - CHECK_OBJECT(tmp_class_creation_3__class_decl_dict); - tmp_dict_arg_name_9 = tmp_class_creation_3__class_decl_dict; - tmp_res = DICT_HAS_ITEM(tmp_dict_arg_name_9, tmp_key_name_9); - assert(!(tmp_res == -1)); - tmp_condition_result_15 = (tmp_res != 0) ? NUITKA_BOOL_TRUE : NUITKA_BOOL_FALSE; - if (tmp_condition_result_15 == NUITKA_BOOL_TRUE) { - goto branch_yes_9; - } else { - goto branch_no_9; - } - } - branch_yes_9:; - CHECK_OBJECT(tmp_class_creation_3__class_decl_dict); - tmp_dictdel_dict = tmp_class_creation_3__class_decl_dict; - tmp_dictdel_key = mod_consts[139]; - tmp_result = DICT_REMOVE_ITEM(tmp_dictdel_dict, tmp_dictdel_key); - if (tmp_result == false) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 84; - - goto try_except_handler_8; - } - branch_no_9:; - { - nuitka_bool tmp_condition_result_16; - PyObject *tmp_expression_name_15; - CHECK_OBJECT(tmp_class_creation_3__metaclass); - tmp_expression_name_15 = tmp_class_creation_3__metaclass; - tmp_result = HAS_ATTR_BOOL(tmp_expression_name_15, mod_consts[140]); - tmp_condition_result_16 = (tmp_result) ? NUITKA_BOOL_TRUE : NUITKA_BOOL_FALSE; - if (tmp_condition_result_16 == NUITKA_BOOL_TRUE) { - goto branch_yes_10; - } else { - goto branch_no_10; - } - } - branch_yes_10:; - { - PyObject *tmp_assign_source_34; - PyObject *tmp_called_name_5; - PyObject *tmp_expression_name_16; - PyObject *tmp_args_name_5; - PyObject *tmp_tuple_element_10; - PyObject *tmp_kwargs_name_5; - CHECK_OBJECT(tmp_class_creation_3__metaclass); - tmp_expression_name_16 = tmp_class_creation_3__metaclass; - tmp_called_name_5 = LOOKUP_ATTRIBUTE(tmp_expression_name_16, mod_consts[140]); - if (tmp_called_name_5 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 84; - - goto try_except_handler_8; - } - tmp_tuple_element_10 = mod_consts[31]; - tmp_args_name_5 = PyTuple_New(2); - PyTuple_SET_ITEM0(tmp_args_name_5, 0, tmp_tuple_element_10); - CHECK_OBJECT(tmp_class_creation_3__bases); - tmp_tuple_element_10 = tmp_class_creation_3__bases; - PyTuple_SET_ITEM0(tmp_args_name_5, 1, tmp_tuple_element_10); - CHECK_OBJECT(tmp_class_creation_3__class_decl_dict); - tmp_kwargs_name_5 = tmp_class_creation_3__class_decl_dict; - frame_705bf4315d2d4f531dff5d3d03b1beec->m_frame.f_lineno = 84; - tmp_assign_source_34 = CALL_FUNCTION(tmp_called_name_5, tmp_args_name_5, tmp_kwargs_name_5); - Py_DECREF(tmp_called_name_5); - Py_DECREF(tmp_args_name_5); - if (tmp_assign_source_34 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 84; - - goto try_except_handler_8; - } - assert(tmp_class_creation_3__prepared == NULL); - tmp_class_creation_3__prepared = tmp_assign_source_34; - } - { - nuitka_bool tmp_condition_result_17; - PyObject *tmp_operand_name_3; - PyObject *tmp_expression_name_17; - CHECK_OBJECT(tmp_class_creation_3__prepared); - tmp_expression_name_17 = tmp_class_creation_3__prepared; - tmp_result = HAS_ATTR_BOOL(tmp_expression_name_17, mod_consts[141]); - tmp_operand_name_3 = (tmp_result) ? Py_True : Py_False; - tmp_res = CHECK_IF_TRUE(tmp_operand_name_3); - if (tmp_res == -1) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 84; - - goto try_except_handler_8; - } - tmp_condition_result_17 = (tmp_res == 0) ? NUITKA_BOOL_TRUE : NUITKA_BOOL_FALSE; - if (tmp_condition_result_17 == NUITKA_BOOL_TRUE) { - goto branch_yes_11; - } else { - goto branch_no_11; - } - } - branch_yes_11:; - { - PyObject *tmp_raise_type_3; - PyObject *tmp_raise_value_3; - PyObject *tmp_left_name_3; - PyObject *tmp_right_name_3; - PyObject *tmp_tuple_element_11; - PyObject *tmp_getattr_target_3; - PyObject *tmp_getattr_attr_3; - PyObject *tmp_getattr_default_3; - tmp_raise_type_3 = PyExc_TypeError; - tmp_left_name_3 = mod_consts[142]; - CHECK_OBJECT(tmp_class_creation_3__metaclass); - tmp_getattr_target_3 = tmp_class_creation_3__metaclass; - tmp_getattr_attr_3 = mod_consts[143]; - tmp_getattr_default_3 = mod_consts[144]; - tmp_tuple_element_11 = BUILTIN_GETATTR(tmp_getattr_target_3, tmp_getattr_attr_3, tmp_getattr_default_3); - if (tmp_tuple_element_11 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 84; - - goto try_except_handler_8; - } - tmp_right_name_3 = PyTuple_New(2); - { - PyObject *tmp_expression_name_18; - PyObject *tmp_type_arg_6; - PyTuple_SET_ITEM(tmp_right_name_3, 0, tmp_tuple_element_11); - CHECK_OBJECT(tmp_class_creation_3__prepared); - tmp_type_arg_6 = tmp_class_creation_3__prepared; - tmp_expression_name_18 = BUILTIN_TYPE1(tmp_type_arg_6); - assert(!(tmp_expression_name_18 == NULL)); - tmp_tuple_element_11 = LOOKUP_ATTRIBUTE(tmp_expression_name_18, mod_consts[143]); - Py_DECREF(tmp_expression_name_18); - if (tmp_tuple_element_11 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 84; - - goto tuple_build_exception_3; - } - PyTuple_SET_ITEM(tmp_right_name_3, 1, tmp_tuple_element_11); - } - goto tuple_build_noexception_3; - // Exception handling pass through code for tuple_build: - tuple_build_exception_3:; - Py_DECREF(tmp_right_name_3); - goto try_except_handler_8; - // Finished with no exception for tuple_build: - tuple_build_noexception_3:; - tmp_raise_value_3 = BINARY_OPERATION_MOD_OBJECT_UNICODE_TUPLE(tmp_left_name_3, tmp_right_name_3); - Py_DECREF(tmp_right_name_3); - if (tmp_raise_value_3 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 84; - - goto try_except_handler_8; - } - exception_type = tmp_raise_type_3; - Py_INCREF(tmp_raise_type_3); - exception_value = tmp_raise_value_3; - exception_lineno = 84; - RAISE_EXCEPTION_IMPLICIT(&exception_type, &exception_value, &exception_tb); - - goto try_except_handler_8; - } - branch_no_11:; - goto branch_end_10; - branch_no_10:; - { - PyObject *tmp_assign_source_35; - tmp_assign_source_35 = PyDict_New(); - assert(tmp_class_creation_3__prepared == NULL); - tmp_class_creation_3__prepared = tmp_assign_source_35; - } - branch_end_10:; - { - PyObject *tmp_assign_source_36; - { - PyObject *tmp_set_locals_3; - CHECK_OBJECT(tmp_class_creation_3__prepared); - tmp_set_locals_3 = tmp_class_creation_3__prepared; - locals_models$unet3d$losses$$$class__3__AbstractDiceLoss_84 = tmp_set_locals_3; - Py_INCREF(tmp_set_locals_3); - } - // Tried code: - // Tried code: - tmp_dictset_value = GET_STRING_DICT_VALUE(moduledict_models$unet3d$losses, (Nuitka_StringObject *)mod_consts[143]); - - if (unlikely(tmp_dictset_value == NULL)) { - tmp_dictset_value = GET_MODULE_VARIABLE_VALUE_FALLBACK(mod_consts[143]); - } - - assert(!(tmp_dictset_value == NULL)); - tmp_res = PyObject_SetItem(locals_models$unet3d$losses$$$class__3__AbstractDiceLoss_84, mod_consts[145], tmp_dictset_value); - if (tmp_res != 0) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 84; - - goto try_except_handler_10; - } - tmp_dictset_value = mod_consts[155]; - tmp_res = PyObject_SetItem(locals_models$unet3d$losses$$$class__3__AbstractDiceLoss_84, mod_consts[121], tmp_dictset_value); - if (tmp_res != 0) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 84; - - goto try_except_handler_10; - } - tmp_dictset_value = mod_consts[31]; - tmp_res = PyObject_SetItem(locals_models$unet3d$losses$$$class__3__AbstractDiceLoss_84, mod_consts[147], tmp_dictset_value); - if (tmp_res != 0) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 84; - - goto try_except_handler_10; - } - if (isFrameUnusable(cache_frame_f19ed9ee26d93c2e82ea0c001dacbbbc_4)) { - Py_XDECREF(cache_frame_f19ed9ee26d93c2e82ea0c001dacbbbc_4); - -#if _DEBUG_REFCOUNTS - if (cache_frame_f19ed9ee26d93c2e82ea0c001dacbbbc_4 == NULL) { - count_active_frame_cache_instances += 1; - } else { - count_released_frame_cache_instances += 1; - } - count_allocated_frame_cache_instances += 1; -#endif - cache_frame_f19ed9ee26d93c2e82ea0c001dacbbbc_4 = MAKE_FUNCTION_FRAME(codeobj_f19ed9ee26d93c2e82ea0c001dacbbbc, module_models$unet3d$losses, sizeof(void *)); -#if _DEBUG_REFCOUNTS - } else { - count_hit_frame_cache_instances += 1; -#endif - } - assert(cache_frame_f19ed9ee26d93c2e82ea0c001dacbbbc_4->m_type_description == NULL); - frame_f19ed9ee26d93c2e82ea0c001dacbbbc_4 = cache_frame_f19ed9ee26d93c2e82ea0c001dacbbbc_4; - - // Push the new frame as the currently active one. - pushFrameStack(frame_f19ed9ee26d93c2e82ea0c001dacbbbc_4); - - // Mark the frame object as in use, ref count 1 will be up for reuse. - assert(Py_REFCNT(frame_f19ed9ee26d93c2e82ea0c001dacbbbc_4) == 2); // Frame stack - - // Framed code: - { - PyObject *tmp_defaults_3; - tmp_defaults_3 = mod_consts[156]; - Py_INCREF(tmp_defaults_3); - - - tmp_dictset_value = MAKE_FUNCTION_models$unet3d$losses$$$function__6___init__(tmp_defaults_3); - - tmp_res = PyObject_SetItem(locals_models$unet3d$losses$$$class__3__AbstractDiceLoss_84, mod_consts[13], tmp_dictset_value); - Py_DECREF(tmp_dictset_value); - if (tmp_res != 0) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 89; - type_description_2 = "o"; - goto frame_exception_exit_4; - } - } - - - tmp_dictset_value = MAKE_FUNCTION_models$unet3d$losses$$$function__7_dice(); - - tmp_res = PyObject_SetItem(locals_models$unet3d$losses$$$class__3__AbstractDiceLoss_84, mod_consts[43], tmp_dictset_value); - Py_DECREF(tmp_dictset_value); - if (tmp_res != 0) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 105; - type_description_2 = "o"; - goto frame_exception_exit_4; - } - - - tmp_dictset_value = MAKE_FUNCTION_models$unet3d$losses$$$function__8_forward(); - - tmp_res = PyObject_SetItem(locals_models$unet3d$losses$$$class__3__AbstractDiceLoss_84, mod_consts[82], tmp_dictset_value); - Py_DECREF(tmp_dictset_value); - if (tmp_res != 0) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 109; - type_description_2 = "o"; - goto frame_exception_exit_4; - } - -#if 0 - RESTORE_FRAME_EXCEPTION(frame_f19ed9ee26d93c2e82ea0c001dacbbbc_4); -#endif - - // Put the previous frame back on top. - popFrameStack(); - - goto frame_no_exception_3; - - frame_exception_exit_4:; - -#if 0 - RESTORE_FRAME_EXCEPTION(frame_f19ed9ee26d93c2e82ea0c001dacbbbc_4); -#endif - - if (exception_tb == NULL) { - exception_tb = MAKE_TRACEBACK(frame_f19ed9ee26d93c2e82ea0c001dacbbbc_4, exception_lineno); - } else if (exception_tb->tb_frame != &frame_f19ed9ee26d93c2e82ea0c001dacbbbc_4->m_frame) { - exception_tb = ADD_TRACEBACK(exception_tb, frame_f19ed9ee26d93c2e82ea0c001dacbbbc_4, exception_lineno); - } - - // Attaches locals to frame if any. - Nuitka_Frame_AttachLocals( - frame_f19ed9ee26d93c2e82ea0c001dacbbbc_4, - type_description_2, - outline_2_var___class__ - ); - - - // Release cached frame if used for exception. - if (frame_f19ed9ee26d93c2e82ea0c001dacbbbc_4 == cache_frame_f19ed9ee26d93c2e82ea0c001dacbbbc_4) { -#if _DEBUG_REFCOUNTS - count_active_frame_cache_instances -= 1; - count_released_frame_cache_instances += 1; -#endif - - Py_DECREF(cache_frame_f19ed9ee26d93c2e82ea0c001dacbbbc_4); - cache_frame_f19ed9ee26d93c2e82ea0c001dacbbbc_4 = NULL; - } - - assertFrameObject(frame_f19ed9ee26d93c2e82ea0c001dacbbbc_4); - - // Put the previous frame back on top. - popFrameStack(); - - // Return the error. - goto nested_frame_exit_3; - - frame_no_exception_3:; - goto skip_nested_handling_3; - nested_frame_exit_3:; - - goto try_except_handler_10; - skip_nested_handling_3:; - { - nuitka_bool tmp_condition_result_18; - PyObject *tmp_compexpr_left_3; - PyObject *tmp_compexpr_right_3; - CHECK_OBJECT(tmp_class_creation_3__bases); - tmp_compexpr_left_3 = tmp_class_creation_3__bases; - CHECK_OBJECT(tmp_class_creation_3__bases_orig); - tmp_compexpr_right_3 = tmp_class_creation_3__bases_orig; - tmp_condition_result_18 = RICH_COMPARE_NE_NBOOL_OBJECT_TUPLE(tmp_compexpr_left_3, tmp_compexpr_right_3); - if (tmp_condition_result_18 == NUITKA_BOOL_EXCEPTION) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 84; - - goto try_except_handler_10; - } - if (tmp_condition_result_18 == NUITKA_BOOL_TRUE) { - goto branch_yes_12; - } else { - goto branch_no_12; - } - assert(tmp_condition_result_18 != NUITKA_BOOL_UNASSIGNED); - } - branch_yes_12:; - CHECK_OBJECT(tmp_class_creation_3__bases_orig); - tmp_dictset_value = tmp_class_creation_3__bases_orig; - tmp_res = PyObject_SetItem(locals_models$unet3d$losses$$$class__3__AbstractDiceLoss_84, mod_consts[150], tmp_dictset_value); - if (tmp_res != 0) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 84; - - goto try_except_handler_10; - } - branch_no_12:; - { - PyObject *tmp_assign_source_37; - PyObject *tmp_called_name_6; - PyObject *tmp_args_name_6; - PyObject *tmp_tuple_element_12; - PyObject *tmp_kwargs_name_6; - CHECK_OBJECT(tmp_class_creation_3__metaclass); - tmp_called_name_6 = tmp_class_creation_3__metaclass; - tmp_tuple_element_12 = mod_consts[31]; - tmp_args_name_6 = PyTuple_New(3); - PyTuple_SET_ITEM0(tmp_args_name_6, 0, tmp_tuple_element_12); - CHECK_OBJECT(tmp_class_creation_3__bases); - tmp_tuple_element_12 = tmp_class_creation_3__bases; - PyTuple_SET_ITEM0(tmp_args_name_6, 1, tmp_tuple_element_12); - tmp_tuple_element_12 = locals_models$unet3d$losses$$$class__3__AbstractDiceLoss_84; - PyTuple_SET_ITEM0(tmp_args_name_6, 2, tmp_tuple_element_12); - CHECK_OBJECT(tmp_class_creation_3__class_decl_dict); - tmp_kwargs_name_6 = tmp_class_creation_3__class_decl_dict; - frame_705bf4315d2d4f531dff5d3d03b1beec->m_frame.f_lineno = 84; - tmp_assign_source_37 = CALL_FUNCTION(tmp_called_name_6, tmp_args_name_6, tmp_kwargs_name_6); - Py_DECREF(tmp_args_name_6); - if (tmp_assign_source_37 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 84; - - goto try_except_handler_10; - } - assert(outline_2_var___class__ == NULL); - outline_2_var___class__ = tmp_assign_source_37; - } - CHECK_OBJECT(outline_2_var___class__); - tmp_assign_source_36 = outline_2_var___class__; - Py_INCREF(tmp_assign_source_36); - goto try_return_handler_10; - NUITKA_CANNOT_GET_HERE("tried codes exits in all cases"); - return NULL; - // Return handler code: - try_return_handler_10:; - Py_DECREF(locals_models$unet3d$losses$$$class__3__AbstractDiceLoss_84); - locals_models$unet3d$losses$$$class__3__AbstractDiceLoss_84 = NULL; - goto try_return_handler_9; - // Exception handler code: - try_except_handler_10:; - exception_keeper_type_8 = exception_type; - exception_keeper_value_8 = exception_value; - exception_keeper_tb_8 = exception_tb; - exception_keeper_lineno_8 = exception_lineno; - exception_type = NULL; - exception_value = NULL; - exception_tb = NULL; - exception_lineno = 0; - - Py_DECREF(locals_models$unet3d$losses$$$class__3__AbstractDiceLoss_84); - locals_models$unet3d$losses$$$class__3__AbstractDiceLoss_84 = NULL; - // Re-raise. - exception_type = exception_keeper_type_8; - exception_value = exception_keeper_value_8; - exception_tb = exception_keeper_tb_8; - exception_lineno = exception_keeper_lineno_8; - - goto try_except_handler_9; - // End of try: - NUITKA_CANNOT_GET_HERE("tried codes exits in all cases"); - return NULL; - // Return handler code: - try_return_handler_9:; - CHECK_OBJECT(outline_2_var___class__); - Py_DECREF(outline_2_var___class__); - outline_2_var___class__ = NULL; - goto outline_result_3; - // Exception handler code: - try_except_handler_9:; - exception_keeper_type_9 = exception_type; - exception_keeper_value_9 = exception_value; - exception_keeper_tb_9 = exception_tb; - exception_keeper_lineno_9 = exception_lineno; - exception_type = NULL; - exception_value = NULL; - exception_tb = NULL; - exception_lineno = 0; - - // Re-raise. - exception_type = exception_keeper_type_9; - exception_value = exception_keeper_value_9; - exception_tb = exception_keeper_tb_9; - exception_lineno = exception_keeper_lineno_9; - - goto outline_exception_3; - // End of try: - NUITKA_CANNOT_GET_HERE("Return statement must have exited already."); - return NULL; - outline_exception_3:; - exception_lineno = 84; - goto try_except_handler_8; - outline_result_3:; - UPDATE_STRING_DICT1(moduledict_models$unet3d$losses, (Nuitka_StringObject *)mod_consts[31], tmp_assign_source_36); - } - goto try_end_4; - // Exception handler code: - try_except_handler_8:; - exception_keeper_type_10 = exception_type; - exception_keeper_value_10 = exception_value; - exception_keeper_tb_10 = exception_tb; - exception_keeper_lineno_10 = exception_lineno; - exception_type = NULL; - exception_value = NULL; - exception_tb = NULL; - exception_lineno = 0; - - Py_XDECREF(tmp_class_creation_3__bases_orig); - tmp_class_creation_3__bases_orig = NULL; - Py_XDECREF(tmp_class_creation_3__bases); - tmp_class_creation_3__bases = NULL; - Py_XDECREF(tmp_class_creation_3__class_decl_dict); - tmp_class_creation_3__class_decl_dict = NULL; - Py_XDECREF(tmp_class_creation_3__metaclass); - tmp_class_creation_3__metaclass = NULL; - Py_XDECREF(tmp_class_creation_3__prepared); - tmp_class_creation_3__prepared = NULL; - // Re-raise. - exception_type = exception_keeper_type_10; - exception_value = exception_keeper_value_10; - exception_tb = exception_keeper_tb_10; - exception_lineno = exception_keeper_lineno_10; - - goto frame_exception_exit_1; - // End of try: - try_end_4:; - CHECK_OBJECT(tmp_class_creation_3__bases_orig); - Py_DECREF(tmp_class_creation_3__bases_orig); - tmp_class_creation_3__bases_orig = NULL; - Py_XDECREF(tmp_class_creation_3__bases); - tmp_class_creation_3__bases = NULL; - Py_XDECREF(tmp_class_creation_3__class_decl_dict); - tmp_class_creation_3__class_decl_dict = NULL; - Py_XDECREF(tmp_class_creation_3__metaclass); - tmp_class_creation_3__metaclass = NULL; - CHECK_OBJECT(tmp_class_creation_3__prepared); - Py_DECREF(tmp_class_creation_3__prepared); - tmp_class_creation_3__prepared = NULL; - // Tried code: - { - PyObject *tmp_assign_source_38; - PyObject *tmp_tuple_element_13; - tmp_tuple_element_13 = GET_STRING_DICT_VALUE(moduledict_models$unet3d$losses, (Nuitka_StringObject *)mod_consts[31]); - - if (unlikely(tmp_tuple_element_13 == NULL)) { - tmp_tuple_element_13 = GET_MODULE_VARIABLE_VALUE_FALLBACK(mod_consts[31]); - } - - if (tmp_tuple_element_13 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 120; - - goto try_except_handler_11; - } - tmp_assign_source_38 = PyTuple_New(1); - PyTuple_SET_ITEM0(tmp_assign_source_38, 0, tmp_tuple_element_13); - assert(tmp_class_creation_4__bases_orig == NULL); - tmp_class_creation_4__bases_orig = tmp_assign_source_38; - } - { - PyObject *tmp_assign_source_39; - PyObject *tmp_dircall_arg1_4; - CHECK_OBJECT(tmp_class_creation_4__bases_orig); - tmp_dircall_arg1_4 = tmp_class_creation_4__bases_orig; - Py_INCREF(tmp_dircall_arg1_4); - - { - PyObject *dir_call_args[] = {tmp_dircall_arg1_4}; - tmp_assign_source_39 = impl_models$$$function__1__mro_entries_conversion(dir_call_args); - } - if (tmp_assign_source_39 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 120; - - goto try_except_handler_11; - } - assert(tmp_class_creation_4__bases == NULL); - tmp_class_creation_4__bases = tmp_assign_source_39; - } - { - PyObject *tmp_assign_source_40; - tmp_assign_source_40 = PyDict_New(); - assert(tmp_class_creation_4__class_decl_dict == NULL); - tmp_class_creation_4__class_decl_dict = tmp_assign_source_40; - } - { - PyObject *tmp_assign_source_41; - PyObject *tmp_metaclass_name_4; - nuitka_bool tmp_condition_result_19; - PyObject *tmp_key_name_10; - PyObject *tmp_dict_arg_name_10; - PyObject *tmp_dict_arg_name_11; - PyObject *tmp_key_name_11; - nuitka_bool tmp_condition_result_20; - int tmp_truth_name_4; - PyObject *tmp_type_arg_7; - PyObject *tmp_expression_name_19; - PyObject *tmp_subscript_name_4; - PyObject *tmp_bases_name_4; - tmp_key_name_10 = mod_consts[139]; - CHECK_OBJECT(tmp_class_creation_4__class_decl_dict); - tmp_dict_arg_name_10 = tmp_class_creation_4__class_decl_dict; - tmp_res = DICT_HAS_ITEM(tmp_dict_arg_name_10, tmp_key_name_10); - assert(!(tmp_res == -1)); - tmp_condition_result_19 = (tmp_res != 0) ? NUITKA_BOOL_TRUE : NUITKA_BOOL_FALSE; - if (tmp_condition_result_19 == NUITKA_BOOL_TRUE) { - goto condexpr_true_7; - } else { - goto condexpr_false_7; - } - condexpr_true_7:; - CHECK_OBJECT(tmp_class_creation_4__class_decl_dict); - tmp_dict_arg_name_11 = tmp_class_creation_4__class_decl_dict; - tmp_key_name_11 = mod_consts[139]; - tmp_metaclass_name_4 = DICT_GET_ITEM_WITH_ERROR(tmp_dict_arg_name_11, tmp_key_name_11); - if (tmp_metaclass_name_4 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 120; - - goto try_except_handler_11; - } - goto condexpr_end_7; - condexpr_false_7:; - CHECK_OBJECT(tmp_class_creation_4__bases); - tmp_truth_name_4 = CHECK_IF_TRUE(tmp_class_creation_4__bases); - if (tmp_truth_name_4 == -1) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 120; - - goto try_except_handler_11; - } - tmp_condition_result_20 = tmp_truth_name_4 == 0 ? NUITKA_BOOL_FALSE : NUITKA_BOOL_TRUE; - if (tmp_condition_result_20 == NUITKA_BOOL_TRUE) { - goto condexpr_true_8; - } else { - goto condexpr_false_8; - } - condexpr_true_8:; - CHECK_OBJECT(tmp_class_creation_4__bases); - tmp_expression_name_19 = tmp_class_creation_4__bases; - tmp_subscript_name_4 = mod_consts[127]; - tmp_type_arg_7 = LOOKUP_SUBSCRIPT_CONST(tmp_expression_name_19, tmp_subscript_name_4, 0); - if (tmp_type_arg_7 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 120; - - goto try_except_handler_11; - } - tmp_metaclass_name_4 = BUILTIN_TYPE1(tmp_type_arg_7); - Py_DECREF(tmp_type_arg_7); - if (tmp_metaclass_name_4 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 120; - - goto try_except_handler_11; - } - goto condexpr_end_8; - condexpr_false_8:; - tmp_metaclass_name_4 = (PyObject *)&PyType_Type; - Py_INCREF(tmp_metaclass_name_4); - condexpr_end_8:; - condexpr_end_7:; - CHECK_OBJECT(tmp_class_creation_4__bases); - tmp_bases_name_4 = tmp_class_creation_4__bases; - tmp_assign_source_41 = SELECT_METACLASS(tmp_metaclass_name_4, tmp_bases_name_4); - Py_DECREF(tmp_metaclass_name_4); - if (tmp_assign_source_41 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 120; - - goto try_except_handler_11; - } - assert(tmp_class_creation_4__metaclass == NULL); - tmp_class_creation_4__metaclass = tmp_assign_source_41; - } - { - nuitka_bool tmp_condition_result_21; - PyObject *tmp_key_name_12; - PyObject *tmp_dict_arg_name_12; - tmp_key_name_12 = mod_consts[139]; - CHECK_OBJECT(tmp_class_creation_4__class_decl_dict); - tmp_dict_arg_name_12 = tmp_class_creation_4__class_decl_dict; - tmp_res = DICT_HAS_ITEM(tmp_dict_arg_name_12, tmp_key_name_12); - assert(!(tmp_res == -1)); - tmp_condition_result_21 = (tmp_res != 0) ? NUITKA_BOOL_TRUE : NUITKA_BOOL_FALSE; - if (tmp_condition_result_21 == NUITKA_BOOL_TRUE) { - goto branch_yes_13; - } else { - goto branch_no_13; - } - } - branch_yes_13:; - CHECK_OBJECT(tmp_class_creation_4__class_decl_dict); - tmp_dictdel_dict = tmp_class_creation_4__class_decl_dict; - tmp_dictdel_key = mod_consts[139]; - tmp_result = DICT_REMOVE_ITEM(tmp_dictdel_dict, tmp_dictdel_key); - if (tmp_result == false) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 120; - - goto try_except_handler_11; - } - branch_no_13:; - { - nuitka_bool tmp_condition_result_22; - PyObject *tmp_expression_name_20; - CHECK_OBJECT(tmp_class_creation_4__metaclass); - tmp_expression_name_20 = tmp_class_creation_4__metaclass; - tmp_result = HAS_ATTR_BOOL(tmp_expression_name_20, mod_consts[140]); - tmp_condition_result_22 = (tmp_result) ? NUITKA_BOOL_TRUE : NUITKA_BOOL_FALSE; - if (tmp_condition_result_22 == NUITKA_BOOL_TRUE) { - goto branch_yes_14; - } else { - goto branch_no_14; - } - } - branch_yes_14:; - { - PyObject *tmp_assign_source_42; - PyObject *tmp_called_name_7; - PyObject *tmp_expression_name_21; - PyObject *tmp_args_name_7; - PyObject *tmp_tuple_element_14; - PyObject *tmp_kwargs_name_7; - CHECK_OBJECT(tmp_class_creation_4__metaclass); - tmp_expression_name_21 = tmp_class_creation_4__metaclass; - tmp_called_name_7 = LOOKUP_ATTRIBUTE(tmp_expression_name_21, mod_consts[140]); - if (tmp_called_name_7 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 120; - - goto try_except_handler_11; - } - tmp_tuple_element_14 = mod_consts[58]; - tmp_args_name_7 = PyTuple_New(2); - PyTuple_SET_ITEM0(tmp_args_name_7, 0, tmp_tuple_element_14); - CHECK_OBJECT(tmp_class_creation_4__bases); - tmp_tuple_element_14 = tmp_class_creation_4__bases; - PyTuple_SET_ITEM0(tmp_args_name_7, 1, tmp_tuple_element_14); - CHECK_OBJECT(tmp_class_creation_4__class_decl_dict); - tmp_kwargs_name_7 = tmp_class_creation_4__class_decl_dict; - frame_705bf4315d2d4f531dff5d3d03b1beec->m_frame.f_lineno = 120; - tmp_assign_source_42 = CALL_FUNCTION(tmp_called_name_7, tmp_args_name_7, tmp_kwargs_name_7); - Py_DECREF(tmp_called_name_7); - Py_DECREF(tmp_args_name_7); - if (tmp_assign_source_42 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 120; - - goto try_except_handler_11; - } - assert(tmp_class_creation_4__prepared == NULL); - tmp_class_creation_4__prepared = tmp_assign_source_42; - } - { - nuitka_bool tmp_condition_result_23; - PyObject *tmp_operand_name_4; - PyObject *tmp_expression_name_22; - CHECK_OBJECT(tmp_class_creation_4__prepared); - tmp_expression_name_22 = tmp_class_creation_4__prepared; - tmp_result = HAS_ATTR_BOOL(tmp_expression_name_22, mod_consts[141]); - tmp_operand_name_4 = (tmp_result) ? Py_True : Py_False; - tmp_res = CHECK_IF_TRUE(tmp_operand_name_4); - if (tmp_res == -1) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 120; - - goto try_except_handler_11; - } - tmp_condition_result_23 = (tmp_res == 0) ? NUITKA_BOOL_TRUE : NUITKA_BOOL_FALSE; - if (tmp_condition_result_23 == NUITKA_BOOL_TRUE) { - goto branch_yes_15; - } else { - goto branch_no_15; - } - } - branch_yes_15:; - { - PyObject *tmp_raise_type_4; - PyObject *tmp_raise_value_4; - PyObject *tmp_left_name_4; - PyObject *tmp_right_name_4; - PyObject *tmp_tuple_element_15; - PyObject *tmp_getattr_target_4; - PyObject *tmp_getattr_attr_4; - PyObject *tmp_getattr_default_4; - tmp_raise_type_4 = PyExc_TypeError; - tmp_left_name_4 = mod_consts[142]; - CHECK_OBJECT(tmp_class_creation_4__metaclass); - tmp_getattr_target_4 = tmp_class_creation_4__metaclass; - tmp_getattr_attr_4 = mod_consts[143]; - tmp_getattr_default_4 = mod_consts[144]; - tmp_tuple_element_15 = BUILTIN_GETATTR(tmp_getattr_target_4, tmp_getattr_attr_4, tmp_getattr_default_4); - if (tmp_tuple_element_15 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 120; - - goto try_except_handler_11; - } - tmp_right_name_4 = PyTuple_New(2); - { - PyObject *tmp_expression_name_23; - PyObject *tmp_type_arg_8; - PyTuple_SET_ITEM(tmp_right_name_4, 0, tmp_tuple_element_15); - CHECK_OBJECT(tmp_class_creation_4__prepared); - tmp_type_arg_8 = tmp_class_creation_4__prepared; - tmp_expression_name_23 = BUILTIN_TYPE1(tmp_type_arg_8); - assert(!(tmp_expression_name_23 == NULL)); - tmp_tuple_element_15 = LOOKUP_ATTRIBUTE(tmp_expression_name_23, mod_consts[143]); - Py_DECREF(tmp_expression_name_23); - if (tmp_tuple_element_15 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 120; - - goto tuple_build_exception_4; - } - PyTuple_SET_ITEM(tmp_right_name_4, 1, tmp_tuple_element_15); - } - goto tuple_build_noexception_4; - // Exception handling pass through code for tuple_build: - tuple_build_exception_4:; - Py_DECREF(tmp_right_name_4); - goto try_except_handler_11; - // Finished with no exception for tuple_build: - tuple_build_noexception_4:; - tmp_raise_value_4 = BINARY_OPERATION_MOD_OBJECT_UNICODE_TUPLE(tmp_left_name_4, tmp_right_name_4); - Py_DECREF(tmp_right_name_4); - if (tmp_raise_value_4 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 120; - - goto try_except_handler_11; - } - exception_type = tmp_raise_type_4; - Py_INCREF(tmp_raise_type_4); - exception_value = tmp_raise_value_4; - exception_lineno = 120; - RAISE_EXCEPTION_IMPLICIT(&exception_type, &exception_value, &exception_tb); - - goto try_except_handler_11; - } - branch_no_15:; - goto branch_end_14; - branch_no_14:; - { - PyObject *tmp_assign_source_43; - tmp_assign_source_43 = PyDict_New(); - assert(tmp_class_creation_4__prepared == NULL); - tmp_class_creation_4__prepared = tmp_assign_source_43; - } - branch_end_14:; - { - PyObject *tmp_assign_source_44; - { - PyObject *tmp_set_locals_4; - CHECK_OBJECT(tmp_class_creation_4__prepared); - tmp_set_locals_4 = tmp_class_creation_4__prepared; - locals_models$unet3d$losses$$$class__4_DiceLoss_120 = tmp_set_locals_4; - Py_INCREF(tmp_set_locals_4); - } - // Tried code: - // Tried code: - tmp_dictset_value = GET_STRING_DICT_VALUE(moduledict_models$unet3d$losses, (Nuitka_StringObject *)mod_consts[143]); - - if (unlikely(tmp_dictset_value == NULL)) { - tmp_dictset_value = GET_MODULE_VARIABLE_VALUE_FALLBACK(mod_consts[143]); - } - - assert(!(tmp_dictset_value == NULL)); - tmp_res = PyObject_SetItem(locals_models$unet3d$losses$$$class__4_DiceLoss_120, mod_consts[145], tmp_dictset_value); - if (tmp_res != 0) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 120; - - goto try_except_handler_13; - } - tmp_dictset_value = mod_consts[160]; - tmp_res = PyObject_SetItem(locals_models$unet3d$losses$$$class__4_DiceLoss_120, mod_consts[121], tmp_dictset_value); - if (tmp_res != 0) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 120; - - goto try_except_handler_13; - } - tmp_dictset_value = mod_consts[58]; - tmp_res = PyObject_SetItem(locals_models$unet3d$losses$$$class__4_DiceLoss_120, mod_consts[147], tmp_dictset_value); - if (tmp_res != 0) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 120; - - goto try_except_handler_13; - } - if (isFrameUnusable(cache_frame_7a70797e1919541bc6bae64c7102f99b_5)) { - Py_XDECREF(cache_frame_7a70797e1919541bc6bae64c7102f99b_5); - -#if _DEBUG_REFCOUNTS - if (cache_frame_7a70797e1919541bc6bae64c7102f99b_5 == NULL) { - count_active_frame_cache_instances += 1; - } else { - count_released_frame_cache_instances += 1; - } - count_allocated_frame_cache_instances += 1; -#endif - cache_frame_7a70797e1919541bc6bae64c7102f99b_5 = MAKE_FUNCTION_FRAME(codeobj_7a70797e1919541bc6bae64c7102f99b, module_models$unet3d$losses, sizeof(void *)); -#if _DEBUG_REFCOUNTS - } else { - count_hit_frame_cache_instances += 1; -#endif - } - assert(cache_frame_7a70797e1919541bc6bae64c7102f99b_5->m_type_description == NULL); - frame_7a70797e1919541bc6bae64c7102f99b_5 = cache_frame_7a70797e1919541bc6bae64c7102f99b_5; - - // Push the new frame as the currently active one. - pushFrameStack(frame_7a70797e1919541bc6bae64c7102f99b_5); - - // Mark the frame object as in use, ref count 1 will be up for reuse. - assert(Py_REFCNT(frame_7a70797e1919541bc6bae64c7102f99b_5) == 2); // Frame stack - - // Framed code: - { - PyObject *tmp_defaults_4; - struct Nuitka_CellObject *tmp_closure_1[1]; - tmp_defaults_4 = mod_consts[156]; - Py_INCREF(tmp_defaults_4); - - tmp_closure_1[0] = outline_3_var___class__; - Py_INCREF(tmp_closure_1[0]); - - tmp_dictset_value = MAKE_FUNCTION_models$unet3d$losses$$$function__9___init__(tmp_defaults_4, tmp_closure_1); - - tmp_res = PyObject_SetItem(locals_models$unet3d$losses$$$class__4_DiceLoss_120, mod_consts[13], tmp_dictset_value); - Py_DECREF(tmp_dictset_value); - if (tmp_res != 0) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 126; - type_description_2 = "c"; - goto frame_exception_exit_5; - } - } - - - tmp_dictset_value = MAKE_FUNCTION_models$unet3d$losses$$$function__10_dice(); - - tmp_res = PyObject_SetItem(locals_models$unet3d$losses$$$class__4_DiceLoss_120, mod_consts[43], tmp_dictset_value); - Py_DECREF(tmp_dictset_value); - if (tmp_res != 0) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 129; - type_description_2 = "c"; - goto frame_exception_exit_5; - } - -#if 0 - RESTORE_FRAME_EXCEPTION(frame_7a70797e1919541bc6bae64c7102f99b_5); -#endif - - // Put the previous frame back on top. - popFrameStack(); - - goto frame_no_exception_4; - - frame_exception_exit_5:; - -#if 0 - RESTORE_FRAME_EXCEPTION(frame_7a70797e1919541bc6bae64c7102f99b_5); -#endif - - if (exception_tb == NULL) { - exception_tb = MAKE_TRACEBACK(frame_7a70797e1919541bc6bae64c7102f99b_5, exception_lineno); - } else if (exception_tb->tb_frame != &frame_7a70797e1919541bc6bae64c7102f99b_5->m_frame) { - exception_tb = ADD_TRACEBACK(exception_tb, frame_7a70797e1919541bc6bae64c7102f99b_5, exception_lineno); - } - - // Attaches locals to frame if any. - Nuitka_Frame_AttachLocals( - frame_7a70797e1919541bc6bae64c7102f99b_5, - type_description_2, - outline_3_var___class__ - ); - - - // Release cached frame if used for exception. - if (frame_7a70797e1919541bc6bae64c7102f99b_5 == cache_frame_7a70797e1919541bc6bae64c7102f99b_5) { -#if _DEBUG_REFCOUNTS - count_active_frame_cache_instances -= 1; - count_released_frame_cache_instances += 1; -#endif - - Py_DECREF(cache_frame_7a70797e1919541bc6bae64c7102f99b_5); - cache_frame_7a70797e1919541bc6bae64c7102f99b_5 = NULL; - } - - assertFrameObject(frame_7a70797e1919541bc6bae64c7102f99b_5); - - // Put the previous frame back on top. - popFrameStack(); - - // Return the error. - goto nested_frame_exit_4; - - frame_no_exception_4:; - goto skip_nested_handling_4; - nested_frame_exit_4:; - - goto try_except_handler_13; - skip_nested_handling_4:; - { - nuitka_bool tmp_condition_result_24; - PyObject *tmp_compexpr_left_4; - PyObject *tmp_compexpr_right_4; - CHECK_OBJECT(tmp_class_creation_4__bases); - tmp_compexpr_left_4 = tmp_class_creation_4__bases; - CHECK_OBJECT(tmp_class_creation_4__bases_orig); - tmp_compexpr_right_4 = tmp_class_creation_4__bases_orig; - tmp_condition_result_24 = RICH_COMPARE_NE_NBOOL_OBJECT_TUPLE(tmp_compexpr_left_4, tmp_compexpr_right_4); - if (tmp_condition_result_24 == NUITKA_BOOL_EXCEPTION) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 120; - - goto try_except_handler_13; - } - if (tmp_condition_result_24 == NUITKA_BOOL_TRUE) { - goto branch_yes_16; - } else { - goto branch_no_16; - } - assert(tmp_condition_result_24 != NUITKA_BOOL_UNASSIGNED); - } - branch_yes_16:; - CHECK_OBJECT(tmp_class_creation_4__bases_orig); - tmp_dictset_value = tmp_class_creation_4__bases_orig; - tmp_res = PyObject_SetItem(locals_models$unet3d$losses$$$class__4_DiceLoss_120, mod_consts[150], tmp_dictset_value); - if (tmp_res != 0) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 120; - - goto try_except_handler_13; - } - branch_no_16:; - { - PyObject *tmp_assign_source_45; - PyObject *tmp_called_name_8; - PyObject *tmp_args_name_8; - PyObject *tmp_tuple_element_16; - PyObject *tmp_kwargs_name_8; - CHECK_OBJECT(tmp_class_creation_4__metaclass); - tmp_called_name_8 = tmp_class_creation_4__metaclass; - tmp_tuple_element_16 = mod_consts[58]; - tmp_args_name_8 = PyTuple_New(3); - PyTuple_SET_ITEM0(tmp_args_name_8, 0, tmp_tuple_element_16); - CHECK_OBJECT(tmp_class_creation_4__bases); - tmp_tuple_element_16 = tmp_class_creation_4__bases; - PyTuple_SET_ITEM0(tmp_args_name_8, 1, tmp_tuple_element_16); - tmp_tuple_element_16 = locals_models$unet3d$losses$$$class__4_DiceLoss_120; - PyTuple_SET_ITEM0(tmp_args_name_8, 2, tmp_tuple_element_16); - CHECK_OBJECT(tmp_class_creation_4__class_decl_dict); - tmp_kwargs_name_8 = tmp_class_creation_4__class_decl_dict; - frame_705bf4315d2d4f531dff5d3d03b1beec->m_frame.f_lineno = 120; - tmp_assign_source_45 = CALL_FUNCTION(tmp_called_name_8, tmp_args_name_8, tmp_kwargs_name_8); - Py_DECREF(tmp_args_name_8); - if (tmp_assign_source_45 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 120; - - goto try_except_handler_13; - } - { - PyObject *old = Nuitka_Cell_GET(outline_3_var___class__); - PyCell_SET(outline_3_var___class__, tmp_assign_source_45); - Py_XDECREF(old); - } - - } - CHECK_OBJECT(Nuitka_Cell_GET(outline_3_var___class__)); - tmp_assign_source_44 = Nuitka_Cell_GET(outline_3_var___class__); - Py_INCREF(tmp_assign_source_44); - goto try_return_handler_13; - NUITKA_CANNOT_GET_HERE("tried codes exits in all cases"); - return NULL; - // Return handler code: - try_return_handler_13:; - Py_DECREF(locals_models$unet3d$losses$$$class__4_DiceLoss_120); - locals_models$unet3d$losses$$$class__4_DiceLoss_120 = NULL; - goto try_return_handler_12; - // Exception handler code: - try_except_handler_13:; - exception_keeper_type_11 = exception_type; - exception_keeper_value_11 = exception_value; - exception_keeper_tb_11 = exception_tb; - exception_keeper_lineno_11 = exception_lineno; - exception_type = NULL; - exception_value = NULL; - exception_tb = NULL; - exception_lineno = 0; - - Py_DECREF(locals_models$unet3d$losses$$$class__4_DiceLoss_120); - locals_models$unet3d$losses$$$class__4_DiceLoss_120 = NULL; - // Re-raise. - exception_type = exception_keeper_type_11; - exception_value = exception_keeper_value_11; - exception_tb = exception_keeper_tb_11; - exception_lineno = exception_keeper_lineno_11; - - goto try_except_handler_12; - // End of try: - NUITKA_CANNOT_GET_HERE("tried codes exits in all cases"); - return NULL; - // Return handler code: - try_return_handler_12:; - CHECK_OBJECT(outline_3_var___class__); - Py_DECREF(outline_3_var___class__); - outline_3_var___class__ = NULL; - goto outline_result_4; - // Exception handler code: - try_except_handler_12:; - exception_keeper_type_12 = exception_type; - exception_keeper_value_12 = exception_value; - exception_keeper_tb_12 = exception_tb; - exception_keeper_lineno_12 = exception_lineno; - exception_type = NULL; - exception_value = NULL; - exception_tb = NULL; - exception_lineno = 0; - - CHECK_OBJECT(outline_3_var___class__); - Py_DECREF(outline_3_var___class__); - outline_3_var___class__ = NULL; - // Re-raise. - exception_type = exception_keeper_type_12; - exception_value = exception_keeper_value_12; - exception_tb = exception_keeper_tb_12; - exception_lineno = exception_keeper_lineno_12; - - goto outline_exception_4; - // End of try: - NUITKA_CANNOT_GET_HERE("Return statement must have exited already."); - return NULL; - outline_exception_4:; - exception_lineno = 120; - goto try_except_handler_11; - outline_result_4:; - UPDATE_STRING_DICT1(moduledict_models$unet3d$losses, (Nuitka_StringObject *)mod_consts[58], tmp_assign_source_44); - } - goto try_end_5; - // Exception handler code: - try_except_handler_11:; - exception_keeper_type_13 = exception_type; - exception_keeper_value_13 = exception_value; - exception_keeper_tb_13 = exception_tb; - exception_keeper_lineno_13 = exception_lineno; - exception_type = NULL; - exception_value = NULL; - exception_tb = NULL; - exception_lineno = 0; - - Py_XDECREF(tmp_class_creation_4__bases_orig); - tmp_class_creation_4__bases_orig = NULL; - Py_XDECREF(tmp_class_creation_4__bases); - tmp_class_creation_4__bases = NULL; - Py_XDECREF(tmp_class_creation_4__class_decl_dict); - tmp_class_creation_4__class_decl_dict = NULL; - Py_XDECREF(tmp_class_creation_4__metaclass); - tmp_class_creation_4__metaclass = NULL; - Py_XDECREF(tmp_class_creation_4__prepared); - tmp_class_creation_4__prepared = NULL; - // Re-raise. - exception_type = exception_keeper_type_13; - exception_value = exception_keeper_value_13; - exception_tb = exception_keeper_tb_13; - exception_lineno = exception_keeper_lineno_13; - - goto frame_exception_exit_1; - // End of try: - try_end_5:; - CHECK_OBJECT(tmp_class_creation_4__bases_orig); - Py_DECREF(tmp_class_creation_4__bases_orig); - tmp_class_creation_4__bases_orig = NULL; - Py_XDECREF(tmp_class_creation_4__bases); - tmp_class_creation_4__bases = NULL; - Py_XDECREF(tmp_class_creation_4__class_decl_dict); - tmp_class_creation_4__class_decl_dict = NULL; - Py_XDECREF(tmp_class_creation_4__metaclass); - tmp_class_creation_4__metaclass = NULL; - CHECK_OBJECT(tmp_class_creation_4__prepared); - Py_DECREF(tmp_class_creation_4__prepared); - tmp_class_creation_4__prepared = NULL; - // Tried code: - { - PyObject *tmp_assign_source_46; - PyObject *tmp_tuple_element_17; - tmp_tuple_element_17 = GET_STRING_DICT_VALUE(moduledict_models$unet3d$losses, (Nuitka_StringObject *)mod_consts[31]); - - if (unlikely(tmp_tuple_element_17 == NULL)) { - tmp_tuple_element_17 = GET_MODULE_VARIABLE_VALUE_FALLBACK(mod_consts[31]); - } - - if (tmp_tuple_element_17 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 133; - - goto try_except_handler_14; - } - tmp_assign_source_46 = PyTuple_New(1); - PyTuple_SET_ITEM0(tmp_assign_source_46, 0, tmp_tuple_element_17); - assert(tmp_class_creation_5__bases_orig == NULL); - tmp_class_creation_5__bases_orig = tmp_assign_source_46; - } - { - PyObject *tmp_assign_source_47; - PyObject *tmp_dircall_arg1_5; - CHECK_OBJECT(tmp_class_creation_5__bases_orig); - tmp_dircall_arg1_5 = tmp_class_creation_5__bases_orig; - Py_INCREF(tmp_dircall_arg1_5); - - { - PyObject *dir_call_args[] = {tmp_dircall_arg1_5}; - tmp_assign_source_47 = impl_models$$$function__1__mro_entries_conversion(dir_call_args); - } - if (tmp_assign_source_47 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 133; - - goto try_except_handler_14; - } - assert(tmp_class_creation_5__bases == NULL); - tmp_class_creation_5__bases = tmp_assign_source_47; - } - { - PyObject *tmp_assign_source_48; - tmp_assign_source_48 = PyDict_New(); - assert(tmp_class_creation_5__class_decl_dict == NULL); - tmp_class_creation_5__class_decl_dict = tmp_assign_source_48; - } - { - PyObject *tmp_assign_source_49; - PyObject *tmp_metaclass_name_5; - nuitka_bool tmp_condition_result_25; - PyObject *tmp_key_name_13; - PyObject *tmp_dict_arg_name_13; - PyObject *tmp_dict_arg_name_14; - PyObject *tmp_key_name_14; - nuitka_bool tmp_condition_result_26; - int tmp_truth_name_5; - PyObject *tmp_type_arg_9; - PyObject *tmp_expression_name_24; - PyObject *tmp_subscript_name_5; - PyObject *tmp_bases_name_5; - tmp_key_name_13 = mod_consts[139]; - CHECK_OBJECT(tmp_class_creation_5__class_decl_dict); - tmp_dict_arg_name_13 = tmp_class_creation_5__class_decl_dict; - tmp_res = DICT_HAS_ITEM(tmp_dict_arg_name_13, tmp_key_name_13); - assert(!(tmp_res == -1)); - tmp_condition_result_25 = (tmp_res != 0) ? NUITKA_BOOL_TRUE : NUITKA_BOOL_FALSE; - if (tmp_condition_result_25 == NUITKA_BOOL_TRUE) { - goto condexpr_true_9; - } else { - goto condexpr_false_9; - } - condexpr_true_9:; - CHECK_OBJECT(tmp_class_creation_5__class_decl_dict); - tmp_dict_arg_name_14 = tmp_class_creation_5__class_decl_dict; - tmp_key_name_14 = mod_consts[139]; - tmp_metaclass_name_5 = DICT_GET_ITEM_WITH_ERROR(tmp_dict_arg_name_14, tmp_key_name_14); - if (tmp_metaclass_name_5 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 133; - - goto try_except_handler_14; - } - goto condexpr_end_9; - condexpr_false_9:; - CHECK_OBJECT(tmp_class_creation_5__bases); - tmp_truth_name_5 = CHECK_IF_TRUE(tmp_class_creation_5__bases); - if (tmp_truth_name_5 == -1) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 133; - - goto try_except_handler_14; - } - tmp_condition_result_26 = tmp_truth_name_5 == 0 ? NUITKA_BOOL_FALSE : NUITKA_BOOL_TRUE; - if (tmp_condition_result_26 == NUITKA_BOOL_TRUE) { - goto condexpr_true_10; - } else { - goto condexpr_false_10; - } - condexpr_true_10:; - CHECK_OBJECT(tmp_class_creation_5__bases); - tmp_expression_name_24 = tmp_class_creation_5__bases; - tmp_subscript_name_5 = mod_consts[127]; - tmp_type_arg_9 = LOOKUP_SUBSCRIPT_CONST(tmp_expression_name_24, tmp_subscript_name_5, 0); - if (tmp_type_arg_9 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 133; - - goto try_except_handler_14; - } - tmp_metaclass_name_5 = BUILTIN_TYPE1(tmp_type_arg_9); - Py_DECREF(tmp_type_arg_9); - if (tmp_metaclass_name_5 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 133; - - goto try_except_handler_14; - } - goto condexpr_end_10; - condexpr_false_10:; - tmp_metaclass_name_5 = (PyObject *)&PyType_Type; - Py_INCREF(tmp_metaclass_name_5); - condexpr_end_10:; - condexpr_end_9:; - CHECK_OBJECT(tmp_class_creation_5__bases); - tmp_bases_name_5 = tmp_class_creation_5__bases; - tmp_assign_source_49 = SELECT_METACLASS(tmp_metaclass_name_5, tmp_bases_name_5); - Py_DECREF(tmp_metaclass_name_5); - if (tmp_assign_source_49 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 133; - - goto try_except_handler_14; - } - assert(tmp_class_creation_5__metaclass == NULL); - tmp_class_creation_5__metaclass = tmp_assign_source_49; - } - { - nuitka_bool tmp_condition_result_27; - PyObject *tmp_key_name_15; - PyObject *tmp_dict_arg_name_15; - tmp_key_name_15 = mod_consts[139]; - CHECK_OBJECT(tmp_class_creation_5__class_decl_dict); - tmp_dict_arg_name_15 = tmp_class_creation_5__class_decl_dict; - tmp_res = DICT_HAS_ITEM(tmp_dict_arg_name_15, tmp_key_name_15); - assert(!(tmp_res == -1)); - tmp_condition_result_27 = (tmp_res != 0) ? NUITKA_BOOL_TRUE : NUITKA_BOOL_FALSE; - if (tmp_condition_result_27 == NUITKA_BOOL_TRUE) { - goto branch_yes_17; - } else { - goto branch_no_17; - } - } - branch_yes_17:; - CHECK_OBJECT(tmp_class_creation_5__class_decl_dict); - tmp_dictdel_dict = tmp_class_creation_5__class_decl_dict; - tmp_dictdel_key = mod_consts[139]; - tmp_result = DICT_REMOVE_ITEM(tmp_dictdel_dict, tmp_dictdel_key); - if (tmp_result == false) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 133; - - goto try_except_handler_14; - } - branch_no_17:; - { - nuitka_bool tmp_condition_result_28; - PyObject *tmp_expression_name_25; - CHECK_OBJECT(tmp_class_creation_5__metaclass); - tmp_expression_name_25 = tmp_class_creation_5__metaclass; - tmp_result = HAS_ATTR_BOOL(tmp_expression_name_25, mod_consts[140]); - tmp_condition_result_28 = (tmp_result) ? NUITKA_BOOL_TRUE : NUITKA_BOOL_FALSE; - if (tmp_condition_result_28 == NUITKA_BOOL_TRUE) { - goto branch_yes_18; - } else { - goto branch_no_18; - } - } - branch_yes_18:; - { - PyObject *tmp_assign_source_50; - PyObject *tmp_called_name_9; - PyObject *tmp_expression_name_26; - PyObject *tmp_args_name_9; - PyObject *tmp_tuple_element_18; - PyObject *tmp_kwargs_name_9; - CHECK_OBJECT(tmp_class_creation_5__metaclass); - tmp_expression_name_26 = tmp_class_creation_5__metaclass; - tmp_called_name_9 = LOOKUP_ATTRIBUTE(tmp_expression_name_26, mod_consts[140]); - if (tmp_called_name_9 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 133; - - goto try_except_handler_14; - } - tmp_tuple_element_18 = mod_consts[110]; - tmp_args_name_9 = PyTuple_New(2); - PyTuple_SET_ITEM0(tmp_args_name_9, 0, tmp_tuple_element_18); - CHECK_OBJECT(tmp_class_creation_5__bases); - tmp_tuple_element_18 = tmp_class_creation_5__bases; - PyTuple_SET_ITEM0(tmp_args_name_9, 1, tmp_tuple_element_18); - CHECK_OBJECT(tmp_class_creation_5__class_decl_dict); - tmp_kwargs_name_9 = tmp_class_creation_5__class_decl_dict; - frame_705bf4315d2d4f531dff5d3d03b1beec->m_frame.f_lineno = 133; - tmp_assign_source_50 = CALL_FUNCTION(tmp_called_name_9, tmp_args_name_9, tmp_kwargs_name_9); - Py_DECREF(tmp_called_name_9); - Py_DECREF(tmp_args_name_9); - if (tmp_assign_source_50 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 133; - - goto try_except_handler_14; - } - assert(tmp_class_creation_5__prepared == NULL); - tmp_class_creation_5__prepared = tmp_assign_source_50; - } - { - nuitka_bool tmp_condition_result_29; - PyObject *tmp_operand_name_5; - PyObject *tmp_expression_name_27; - CHECK_OBJECT(tmp_class_creation_5__prepared); - tmp_expression_name_27 = tmp_class_creation_5__prepared; - tmp_result = HAS_ATTR_BOOL(tmp_expression_name_27, mod_consts[141]); - tmp_operand_name_5 = (tmp_result) ? Py_True : Py_False; - tmp_res = CHECK_IF_TRUE(tmp_operand_name_5); - if (tmp_res == -1) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 133; - - goto try_except_handler_14; - } - tmp_condition_result_29 = (tmp_res == 0) ? NUITKA_BOOL_TRUE : NUITKA_BOOL_FALSE; - if (tmp_condition_result_29 == NUITKA_BOOL_TRUE) { - goto branch_yes_19; - } else { - goto branch_no_19; - } - } - branch_yes_19:; - { - PyObject *tmp_raise_type_5; - PyObject *tmp_raise_value_5; - PyObject *tmp_left_name_5; - PyObject *tmp_right_name_5; - PyObject *tmp_tuple_element_19; - PyObject *tmp_getattr_target_5; - PyObject *tmp_getattr_attr_5; - PyObject *tmp_getattr_default_5; - tmp_raise_type_5 = PyExc_TypeError; - tmp_left_name_5 = mod_consts[142]; - CHECK_OBJECT(tmp_class_creation_5__metaclass); - tmp_getattr_target_5 = tmp_class_creation_5__metaclass; - tmp_getattr_attr_5 = mod_consts[143]; - tmp_getattr_default_5 = mod_consts[144]; - tmp_tuple_element_19 = BUILTIN_GETATTR(tmp_getattr_target_5, tmp_getattr_attr_5, tmp_getattr_default_5); - if (tmp_tuple_element_19 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 133; - - goto try_except_handler_14; - } - tmp_right_name_5 = PyTuple_New(2); - { - PyObject *tmp_expression_name_28; - PyObject *tmp_type_arg_10; - PyTuple_SET_ITEM(tmp_right_name_5, 0, tmp_tuple_element_19); - CHECK_OBJECT(tmp_class_creation_5__prepared); - tmp_type_arg_10 = tmp_class_creation_5__prepared; - tmp_expression_name_28 = BUILTIN_TYPE1(tmp_type_arg_10); - assert(!(tmp_expression_name_28 == NULL)); - tmp_tuple_element_19 = LOOKUP_ATTRIBUTE(tmp_expression_name_28, mod_consts[143]); - Py_DECREF(tmp_expression_name_28); - if (tmp_tuple_element_19 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 133; - - goto tuple_build_exception_5; - } - PyTuple_SET_ITEM(tmp_right_name_5, 1, tmp_tuple_element_19); - } - goto tuple_build_noexception_5; - // Exception handling pass through code for tuple_build: - tuple_build_exception_5:; - Py_DECREF(tmp_right_name_5); - goto try_except_handler_14; - // Finished with no exception for tuple_build: - tuple_build_noexception_5:; - tmp_raise_value_5 = BINARY_OPERATION_MOD_OBJECT_UNICODE_TUPLE(tmp_left_name_5, tmp_right_name_5); - Py_DECREF(tmp_right_name_5); - if (tmp_raise_value_5 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 133; - - goto try_except_handler_14; - } - exception_type = tmp_raise_type_5; - Py_INCREF(tmp_raise_type_5); - exception_value = tmp_raise_value_5; - exception_lineno = 133; - RAISE_EXCEPTION_IMPLICIT(&exception_type, &exception_value, &exception_tb); - - goto try_except_handler_14; - } - branch_no_19:; - goto branch_end_18; - branch_no_18:; - { - PyObject *tmp_assign_source_51; - tmp_assign_source_51 = PyDict_New(); - assert(tmp_class_creation_5__prepared == NULL); - tmp_class_creation_5__prepared = tmp_assign_source_51; - } - branch_end_18:; - { - PyObject *tmp_assign_source_52; - { - PyObject *tmp_set_locals_5; - CHECK_OBJECT(tmp_class_creation_5__prepared); - tmp_set_locals_5 = tmp_class_creation_5__prepared; - locals_models$unet3d$losses$$$class__5_GeneralizedDiceLoss_133 = tmp_set_locals_5; - Py_INCREF(tmp_set_locals_5); - } - // Tried code: - // Tried code: - tmp_dictset_value = GET_STRING_DICT_VALUE(moduledict_models$unet3d$losses, (Nuitka_StringObject *)mod_consts[143]); - - if (unlikely(tmp_dictset_value == NULL)) { - tmp_dictset_value = GET_MODULE_VARIABLE_VALUE_FALLBACK(mod_consts[143]); - } - - assert(!(tmp_dictset_value == NULL)); - tmp_res = PyObject_SetItem(locals_models$unet3d$losses$$$class__5_GeneralizedDiceLoss_133, mod_consts[145], tmp_dictset_value); - if (tmp_res != 0) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 133; - - goto try_except_handler_16; - } - tmp_dictset_value = mod_consts[163]; - tmp_res = PyObject_SetItem(locals_models$unet3d$losses$$$class__5_GeneralizedDiceLoss_133, mod_consts[121], tmp_dictset_value); - if (tmp_res != 0) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 133; - - goto try_except_handler_16; - } - tmp_dictset_value = mod_consts[110]; - tmp_res = PyObject_SetItem(locals_models$unet3d$losses$$$class__5_GeneralizedDiceLoss_133, mod_consts[147], tmp_dictset_value); - if (tmp_res != 0) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 133; - - goto try_except_handler_16; - } - if (isFrameUnusable(cache_frame_0f3b06d4df296077ba10f315932c80a2_6)) { - Py_XDECREF(cache_frame_0f3b06d4df296077ba10f315932c80a2_6); - -#if _DEBUG_REFCOUNTS - if (cache_frame_0f3b06d4df296077ba10f315932c80a2_6 == NULL) { - count_active_frame_cache_instances += 1; - } else { - count_released_frame_cache_instances += 1; - } - count_allocated_frame_cache_instances += 1; -#endif - cache_frame_0f3b06d4df296077ba10f315932c80a2_6 = MAKE_FUNCTION_FRAME(codeobj_0f3b06d4df296077ba10f315932c80a2, module_models$unet3d$losses, sizeof(void *)); -#if _DEBUG_REFCOUNTS - } else { - count_hit_frame_cache_instances += 1; -#endif - } - assert(cache_frame_0f3b06d4df296077ba10f315932c80a2_6->m_type_description == NULL); - frame_0f3b06d4df296077ba10f315932c80a2_6 = cache_frame_0f3b06d4df296077ba10f315932c80a2_6; - - // Push the new frame as the currently active one. - pushFrameStack(frame_0f3b06d4df296077ba10f315932c80a2_6); - - // Mark the frame object as in use, ref count 1 will be up for reuse. - assert(Py_REFCNT(frame_0f3b06d4df296077ba10f315932c80a2_6) == 2); // Frame stack - - // Framed code: - { - PyObject *tmp_defaults_5; - struct Nuitka_CellObject *tmp_closure_2[1]; - tmp_defaults_5 = mod_consts[164]; - Py_INCREF(tmp_defaults_5); - - tmp_closure_2[0] = outline_4_var___class__; - Py_INCREF(tmp_closure_2[0]); - - tmp_dictset_value = MAKE_FUNCTION_models$unet3d$losses$$$function__11___init__(tmp_defaults_5, tmp_closure_2); - - tmp_res = PyObject_SetItem(locals_models$unet3d$losses$$$class__5_GeneralizedDiceLoss_133, mod_consts[13], tmp_dictset_value); - Py_DECREF(tmp_dictset_value); - if (tmp_res != 0) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 137; - type_description_2 = "c"; - goto frame_exception_exit_6; - } - } - - - tmp_dictset_value = MAKE_FUNCTION_models$unet3d$losses$$$function__12_dice(); - - tmp_res = PyObject_SetItem(locals_models$unet3d$losses$$$class__5_GeneralizedDiceLoss_133, mod_consts[43], tmp_dictset_value); - Py_DECREF(tmp_dictset_value); - if (tmp_res != 0) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 141; - type_description_2 = "c"; - goto frame_exception_exit_6; - } - -#if 0 - RESTORE_FRAME_EXCEPTION(frame_0f3b06d4df296077ba10f315932c80a2_6); -#endif - - // Put the previous frame back on top. - popFrameStack(); - - goto frame_no_exception_5; - - frame_exception_exit_6:; - -#if 0 - RESTORE_FRAME_EXCEPTION(frame_0f3b06d4df296077ba10f315932c80a2_6); -#endif - - if (exception_tb == NULL) { - exception_tb = MAKE_TRACEBACK(frame_0f3b06d4df296077ba10f315932c80a2_6, exception_lineno); - } else if (exception_tb->tb_frame != &frame_0f3b06d4df296077ba10f315932c80a2_6->m_frame) { - exception_tb = ADD_TRACEBACK(exception_tb, frame_0f3b06d4df296077ba10f315932c80a2_6, exception_lineno); - } - - // Attaches locals to frame if any. - Nuitka_Frame_AttachLocals( - frame_0f3b06d4df296077ba10f315932c80a2_6, - type_description_2, - outline_4_var___class__ - ); - - - // Release cached frame if used for exception. - if (frame_0f3b06d4df296077ba10f315932c80a2_6 == cache_frame_0f3b06d4df296077ba10f315932c80a2_6) { -#if _DEBUG_REFCOUNTS - count_active_frame_cache_instances -= 1; - count_released_frame_cache_instances += 1; -#endif - - Py_DECREF(cache_frame_0f3b06d4df296077ba10f315932c80a2_6); - cache_frame_0f3b06d4df296077ba10f315932c80a2_6 = NULL; - } - - assertFrameObject(frame_0f3b06d4df296077ba10f315932c80a2_6); - - // Put the previous frame back on top. - popFrameStack(); - - // Return the error. - goto nested_frame_exit_5; - - frame_no_exception_5:; - goto skip_nested_handling_5; - nested_frame_exit_5:; - - goto try_except_handler_16; - skip_nested_handling_5:; - { - nuitka_bool tmp_condition_result_30; - PyObject *tmp_compexpr_left_5; - PyObject *tmp_compexpr_right_5; - CHECK_OBJECT(tmp_class_creation_5__bases); - tmp_compexpr_left_5 = tmp_class_creation_5__bases; - CHECK_OBJECT(tmp_class_creation_5__bases_orig); - tmp_compexpr_right_5 = tmp_class_creation_5__bases_orig; - tmp_condition_result_30 = RICH_COMPARE_NE_NBOOL_OBJECT_TUPLE(tmp_compexpr_left_5, tmp_compexpr_right_5); - if (tmp_condition_result_30 == NUITKA_BOOL_EXCEPTION) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 133; - - goto try_except_handler_16; - } - if (tmp_condition_result_30 == NUITKA_BOOL_TRUE) { - goto branch_yes_20; - } else { - goto branch_no_20; - } - assert(tmp_condition_result_30 != NUITKA_BOOL_UNASSIGNED); - } - branch_yes_20:; - CHECK_OBJECT(tmp_class_creation_5__bases_orig); - tmp_dictset_value = tmp_class_creation_5__bases_orig; - tmp_res = PyObject_SetItem(locals_models$unet3d$losses$$$class__5_GeneralizedDiceLoss_133, mod_consts[150], tmp_dictset_value); - if (tmp_res != 0) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 133; - - goto try_except_handler_16; - } - branch_no_20:; - { - PyObject *tmp_assign_source_53; - PyObject *tmp_called_name_10; - PyObject *tmp_args_name_10; - PyObject *tmp_tuple_element_20; - PyObject *tmp_kwargs_name_10; - CHECK_OBJECT(tmp_class_creation_5__metaclass); - tmp_called_name_10 = tmp_class_creation_5__metaclass; - tmp_tuple_element_20 = mod_consts[110]; - tmp_args_name_10 = PyTuple_New(3); - PyTuple_SET_ITEM0(tmp_args_name_10, 0, tmp_tuple_element_20); - CHECK_OBJECT(tmp_class_creation_5__bases); - tmp_tuple_element_20 = tmp_class_creation_5__bases; - PyTuple_SET_ITEM0(tmp_args_name_10, 1, tmp_tuple_element_20); - tmp_tuple_element_20 = locals_models$unet3d$losses$$$class__5_GeneralizedDiceLoss_133; - PyTuple_SET_ITEM0(tmp_args_name_10, 2, tmp_tuple_element_20); - CHECK_OBJECT(tmp_class_creation_5__class_decl_dict); - tmp_kwargs_name_10 = tmp_class_creation_5__class_decl_dict; - frame_705bf4315d2d4f531dff5d3d03b1beec->m_frame.f_lineno = 133; - tmp_assign_source_53 = CALL_FUNCTION(tmp_called_name_10, tmp_args_name_10, tmp_kwargs_name_10); - Py_DECREF(tmp_args_name_10); - if (tmp_assign_source_53 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 133; - - goto try_except_handler_16; - } - { - PyObject *old = Nuitka_Cell_GET(outline_4_var___class__); - PyCell_SET(outline_4_var___class__, tmp_assign_source_53); - Py_XDECREF(old); - } - - } - CHECK_OBJECT(Nuitka_Cell_GET(outline_4_var___class__)); - tmp_assign_source_52 = Nuitka_Cell_GET(outline_4_var___class__); - Py_INCREF(tmp_assign_source_52); - goto try_return_handler_16; - NUITKA_CANNOT_GET_HERE("tried codes exits in all cases"); - return NULL; - // Return handler code: - try_return_handler_16:; - Py_DECREF(locals_models$unet3d$losses$$$class__5_GeneralizedDiceLoss_133); - locals_models$unet3d$losses$$$class__5_GeneralizedDiceLoss_133 = NULL; - goto try_return_handler_15; - // Exception handler code: - try_except_handler_16:; - exception_keeper_type_14 = exception_type; - exception_keeper_value_14 = exception_value; - exception_keeper_tb_14 = exception_tb; - exception_keeper_lineno_14 = exception_lineno; - exception_type = NULL; - exception_value = NULL; - exception_tb = NULL; - exception_lineno = 0; - - Py_DECREF(locals_models$unet3d$losses$$$class__5_GeneralizedDiceLoss_133); - locals_models$unet3d$losses$$$class__5_GeneralizedDiceLoss_133 = NULL; - // Re-raise. - exception_type = exception_keeper_type_14; - exception_value = exception_keeper_value_14; - exception_tb = exception_keeper_tb_14; - exception_lineno = exception_keeper_lineno_14; - - goto try_except_handler_15; - // End of try: - NUITKA_CANNOT_GET_HERE("tried codes exits in all cases"); - return NULL; - // Return handler code: - try_return_handler_15:; - CHECK_OBJECT(outline_4_var___class__); - Py_DECREF(outline_4_var___class__); - outline_4_var___class__ = NULL; - goto outline_result_5; - // Exception handler code: - try_except_handler_15:; - exception_keeper_type_15 = exception_type; - exception_keeper_value_15 = exception_value; - exception_keeper_tb_15 = exception_tb; - exception_keeper_lineno_15 = exception_lineno; - exception_type = NULL; - exception_value = NULL; - exception_tb = NULL; - exception_lineno = 0; - - CHECK_OBJECT(outline_4_var___class__); - Py_DECREF(outline_4_var___class__); - outline_4_var___class__ = NULL; - // Re-raise. - exception_type = exception_keeper_type_15; - exception_value = exception_keeper_value_15; - exception_tb = exception_keeper_tb_15; - exception_lineno = exception_keeper_lineno_15; - - goto outline_exception_5; - // End of try: - NUITKA_CANNOT_GET_HERE("Return statement must have exited already."); - return NULL; - outline_exception_5:; - exception_lineno = 133; - goto try_except_handler_14; - outline_result_5:; - UPDATE_STRING_DICT1(moduledict_models$unet3d$losses, (Nuitka_StringObject *)mod_consts[110], tmp_assign_source_52); - } - goto try_end_6; - // Exception handler code: - try_except_handler_14:; - exception_keeper_type_16 = exception_type; - exception_keeper_value_16 = exception_value; - exception_keeper_tb_16 = exception_tb; - exception_keeper_lineno_16 = exception_lineno; - exception_type = NULL; - exception_value = NULL; - exception_tb = NULL; - exception_lineno = 0; - - Py_XDECREF(tmp_class_creation_5__bases_orig); - tmp_class_creation_5__bases_orig = NULL; - Py_XDECREF(tmp_class_creation_5__bases); - tmp_class_creation_5__bases = NULL; - Py_XDECREF(tmp_class_creation_5__class_decl_dict); - tmp_class_creation_5__class_decl_dict = NULL; - Py_XDECREF(tmp_class_creation_5__metaclass); - tmp_class_creation_5__metaclass = NULL; - Py_XDECREF(tmp_class_creation_5__prepared); - tmp_class_creation_5__prepared = NULL; - // Re-raise. - exception_type = exception_keeper_type_16; - exception_value = exception_keeper_value_16; - exception_tb = exception_keeper_tb_16; - exception_lineno = exception_keeper_lineno_16; - - goto frame_exception_exit_1; - // End of try: - try_end_6:; - CHECK_OBJECT(tmp_class_creation_5__bases_orig); - Py_DECREF(tmp_class_creation_5__bases_orig); - tmp_class_creation_5__bases_orig = NULL; - Py_XDECREF(tmp_class_creation_5__bases); - tmp_class_creation_5__bases = NULL; - Py_XDECREF(tmp_class_creation_5__class_decl_dict); - tmp_class_creation_5__class_decl_dict = NULL; - Py_XDECREF(tmp_class_creation_5__metaclass); - tmp_class_creation_5__metaclass = NULL; - CHECK_OBJECT(tmp_class_creation_5__prepared); - Py_DECREF(tmp_class_creation_5__prepared); - tmp_class_creation_5__prepared = NULL; - // Tried code: - { - PyObject *tmp_assign_source_54; - PyObject *tmp_tuple_element_21; - PyObject *tmp_expression_name_29; - tmp_expression_name_29 = GET_STRING_DICT_VALUE(moduledict_models$unet3d$losses, (Nuitka_StringObject *)mod_consts[36]); - - if (unlikely(tmp_expression_name_29 == NULL)) { - tmp_expression_name_29 = GET_MODULE_VARIABLE_VALUE_FALLBACK(mod_consts[36]); - } - - if (tmp_expression_name_29 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 168; - - goto try_except_handler_17; - } - tmp_tuple_element_21 = LOOKUP_ATTRIBUTE(tmp_expression_name_29, mod_consts[138]); - if (tmp_tuple_element_21 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 168; - - goto try_except_handler_17; - } - tmp_assign_source_54 = PyTuple_New(1); - PyTuple_SET_ITEM(tmp_assign_source_54, 0, tmp_tuple_element_21); - assert(tmp_class_creation_6__bases_orig == NULL); - tmp_class_creation_6__bases_orig = tmp_assign_source_54; - } - { - PyObject *tmp_assign_source_55; - PyObject *tmp_dircall_arg1_6; - CHECK_OBJECT(tmp_class_creation_6__bases_orig); - tmp_dircall_arg1_6 = tmp_class_creation_6__bases_orig; - Py_INCREF(tmp_dircall_arg1_6); - - { - PyObject *dir_call_args[] = {tmp_dircall_arg1_6}; - tmp_assign_source_55 = impl_models$$$function__1__mro_entries_conversion(dir_call_args); - } - if (tmp_assign_source_55 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 168; - - goto try_except_handler_17; - } - assert(tmp_class_creation_6__bases == NULL); - tmp_class_creation_6__bases = tmp_assign_source_55; - } - { - PyObject *tmp_assign_source_56; - tmp_assign_source_56 = PyDict_New(); - assert(tmp_class_creation_6__class_decl_dict == NULL); - tmp_class_creation_6__class_decl_dict = tmp_assign_source_56; - } - { - PyObject *tmp_assign_source_57; - PyObject *tmp_metaclass_name_6; - nuitka_bool tmp_condition_result_31; - PyObject *tmp_key_name_16; - PyObject *tmp_dict_arg_name_16; - PyObject *tmp_dict_arg_name_17; - PyObject *tmp_key_name_17; - nuitka_bool tmp_condition_result_32; - int tmp_truth_name_6; - PyObject *tmp_type_arg_11; - PyObject *tmp_expression_name_30; - PyObject *tmp_subscript_name_6; - PyObject *tmp_bases_name_6; - tmp_key_name_16 = mod_consts[139]; - CHECK_OBJECT(tmp_class_creation_6__class_decl_dict); - tmp_dict_arg_name_16 = tmp_class_creation_6__class_decl_dict; - tmp_res = DICT_HAS_ITEM(tmp_dict_arg_name_16, tmp_key_name_16); - assert(!(tmp_res == -1)); - tmp_condition_result_31 = (tmp_res != 0) ? NUITKA_BOOL_TRUE : NUITKA_BOOL_FALSE; - if (tmp_condition_result_31 == NUITKA_BOOL_TRUE) { - goto condexpr_true_11; - } else { - goto condexpr_false_11; - } - condexpr_true_11:; - CHECK_OBJECT(tmp_class_creation_6__class_decl_dict); - tmp_dict_arg_name_17 = tmp_class_creation_6__class_decl_dict; - tmp_key_name_17 = mod_consts[139]; - tmp_metaclass_name_6 = DICT_GET_ITEM_WITH_ERROR(tmp_dict_arg_name_17, tmp_key_name_17); - if (tmp_metaclass_name_6 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 168; - - goto try_except_handler_17; - } - goto condexpr_end_11; - condexpr_false_11:; - CHECK_OBJECT(tmp_class_creation_6__bases); - tmp_truth_name_6 = CHECK_IF_TRUE(tmp_class_creation_6__bases); - if (tmp_truth_name_6 == -1) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 168; - - goto try_except_handler_17; - } - tmp_condition_result_32 = tmp_truth_name_6 == 0 ? NUITKA_BOOL_FALSE : NUITKA_BOOL_TRUE; - if (tmp_condition_result_32 == NUITKA_BOOL_TRUE) { - goto condexpr_true_12; - } else { - goto condexpr_false_12; - } - condexpr_true_12:; - CHECK_OBJECT(tmp_class_creation_6__bases); - tmp_expression_name_30 = tmp_class_creation_6__bases; - tmp_subscript_name_6 = mod_consts[127]; - tmp_type_arg_11 = LOOKUP_SUBSCRIPT_CONST(tmp_expression_name_30, tmp_subscript_name_6, 0); - if (tmp_type_arg_11 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 168; - - goto try_except_handler_17; - } - tmp_metaclass_name_6 = BUILTIN_TYPE1(tmp_type_arg_11); - Py_DECREF(tmp_type_arg_11); - if (tmp_metaclass_name_6 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 168; - - goto try_except_handler_17; - } - goto condexpr_end_12; - condexpr_false_12:; - tmp_metaclass_name_6 = (PyObject *)&PyType_Type; - Py_INCREF(tmp_metaclass_name_6); - condexpr_end_12:; - condexpr_end_11:; - CHECK_OBJECT(tmp_class_creation_6__bases); - tmp_bases_name_6 = tmp_class_creation_6__bases; - tmp_assign_source_57 = SELECT_METACLASS(tmp_metaclass_name_6, tmp_bases_name_6); - Py_DECREF(tmp_metaclass_name_6); - if (tmp_assign_source_57 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 168; - - goto try_except_handler_17; - } - assert(tmp_class_creation_6__metaclass == NULL); - tmp_class_creation_6__metaclass = tmp_assign_source_57; - } - { - nuitka_bool tmp_condition_result_33; - PyObject *tmp_key_name_18; - PyObject *tmp_dict_arg_name_18; - tmp_key_name_18 = mod_consts[139]; - CHECK_OBJECT(tmp_class_creation_6__class_decl_dict); - tmp_dict_arg_name_18 = tmp_class_creation_6__class_decl_dict; - tmp_res = DICT_HAS_ITEM(tmp_dict_arg_name_18, tmp_key_name_18); - assert(!(tmp_res == -1)); - tmp_condition_result_33 = (tmp_res != 0) ? NUITKA_BOOL_TRUE : NUITKA_BOOL_FALSE; - if (tmp_condition_result_33 == NUITKA_BOOL_TRUE) { - goto branch_yes_21; - } else { - goto branch_no_21; - } - } - branch_yes_21:; - CHECK_OBJECT(tmp_class_creation_6__class_decl_dict); - tmp_dictdel_dict = tmp_class_creation_6__class_decl_dict; - tmp_dictdel_key = mod_consts[139]; - tmp_result = DICT_REMOVE_ITEM(tmp_dictdel_dict, tmp_dictdel_key); - if (tmp_result == false) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 168; - - goto try_except_handler_17; - } - branch_no_21:; - { - nuitka_bool tmp_condition_result_34; - PyObject *tmp_expression_name_31; - CHECK_OBJECT(tmp_class_creation_6__metaclass); - tmp_expression_name_31 = tmp_class_creation_6__metaclass; - tmp_result = HAS_ATTR_BOOL(tmp_expression_name_31, mod_consts[140]); - tmp_condition_result_34 = (tmp_result) ? NUITKA_BOOL_TRUE : NUITKA_BOOL_FALSE; - if (tmp_condition_result_34 == NUITKA_BOOL_TRUE) { - goto branch_yes_22; - } else { - goto branch_no_22; - } - } - branch_yes_22:; - { - PyObject *tmp_assign_source_58; - PyObject *tmp_called_name_11; - PyObject *tmp_expression_name_32; - PyObject *tmp_args_name_11; - PyObject *tmp_tuple_element_22; - PyObject *tmp_kwargs_name_11; - CHECK_OBJECT(tmp_class_creation_6__metaclass); - tmp_expression_name_32 = tmp_class_creation_6__metaclass; - tmp_called_name_11 = LOOKUP_ATTRIBUTE(tmp_expression_name_32, mod_consts[140]); - if (tmp_called_name_11 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 168; - - goto try_except_handler_17; - } - tmp_tuple_element_22 = mod_consts[53]; - tmp_args_name_11 = PyTuple_New(2); - PyTuple_SET_ITEM0(tmp_args_name_11, 0, tmp_tuple_element_22); - CHECK_OBJECT(tmp_class_creation_6__bases); - tmp_tuple_element_22 = tmp_class_creation_6__bases; - PyTuple_SET_ITEM0(tmp_args_name_11, 1, tmp_tuple_element_22); - CHECK_OBJECT(tmp_class_creation_6__class_decl_dict); - tmp_kwargs_name_11 = tmp_class_creation_6__class_decl_dict; - frame_705bf4315d2d4f531dff5d3d03b1beec->m_frame.f_lineno = 168; - tmp_assign_source_58 = CALL_FUNCTION(tmp_called_name_11, tmp_args_name_11, tmp_kwargs_name_11); - Py_DECREF(tmp_called_name_11); - Py_DECREF(tmp_args_name_11); - if (tmp_assign_source_58 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 168; - - goto try_except_handler_17; - } - assert(tmp_class_creation_6__prepared == NULL); - tmp_class_creation_6__prepared = tmp_assign_source_58; - } - { - nuitka_bool tmp_condition_result_35; - PyObject *tmp_operand_name_6; - PyObject *tmp_expression_name_33; - CHECK_OBJECT(tmp_class_creation_6__prepared); - tmp_expression_name_33 = tmp_class_creation_6__prepared; - tmp_result = HAS_ATTR_BOOL(tmp_expression_name_33, mod_consts[141]); - tmp_operand_name_6 = (tmp_result) ? Py_True : Py_False; - tmp_res = CHECK_IF_TRUE(tmp_operand_name_6); - if (tmp_res == -1) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 168; - - goto try_except_handler_17; - } - tmp_condition_result_35 = (tmp_res == 0) ? NUITKA_BOOL_TRUE : NUITKA_BOOL_FALSE; - if (tmp_condition_result_35 == NUITKA_BOOL_TRUE) { - goto branch_yes_23; - } else { - goto branch_no_23; - } - } - branch_yes_23:; - { - PyObject *tmp_raise_type_6; - PyObject *tmp_raise_value_6; - PyObject *tmp_left_name_6; - PyObject *tmp_right_name_6; - PyObject *tmp_tuple_element_23; - PyObject *tmp_getattr_target_6; - PyObject *tmp_getattr_attr_6; - PyObject *tmp_getattr_default_6; - tmp_raise_type_6 = PyExc_TypeError; - tmp_left_name_6 = mod_consts[142]; - CHECK_OBJECT(tmp_class_creation_6__metaclass); - tmp_getattr_target_6 = tmp_class_creation_6__metaclass; - tmp_getattr_attr_6 = mod_consts[143]; - tmp_getattr_default_6 = mod_consts[144]; - tmp_tuple_element_23 = BUILTIN_GETATTR(tmp_getattr_target_6, tmp_getattr_attr_6, tmp_getattr_default_6); - if (tmp_tuple_element_23 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 168; - - goto try_except_handler_17; - } - tmp_right_name_6 = PyTuple_New(2); - { - PyObject *tmp_expression_name_34; - PyObject *tmp_type_arg_12; - PyTuple_SET_ITEM(tmp_right_name_6, 0, tmp_tuple_element_23); - CHECK_OBJECT(tmp_class_creation_6__prepared); - tmp_type_arg_12 = tmp_class_creation_6__prepared; - tmp_expression_name_34 = BUILTIN_TYPE1(tmp_type_arg_12); - assert(!(tmp_expression_name_34 == NULL)); - tmp_tuple_element_23 = LOOKUP_ATTRIBUTE(tmp_expression_name_34, mod_consts[143]); - Py_DECREF(tmp_expression_name_34); - if (tmp_tuple_element_23 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 168; - - goto tuple_build_exception_6; - } - PyTuple_SET_ITEM(tmp_right_name_6, 1, tmp_tuple_element_23); - } - goto tuple_build_noexception_6; - // Exception handling pass through code for tuple_build: - tuple_build_exception_6:; - Py_DECREF(tmp_right_name_6); - goto try_except_handler_17; - // Finished with no exception for tuple_build: - tuple_build_noexception_6:; - tmp_raise_value_6 = BINARY_OPERATION_MOD_OBJECT_UNICODE_TUPLE(tmp_left_name_6, tmp_right_name_6); - Py_DECREF(tmp_right_name_6); - if (tmp_raise_value_6 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 168; - - goto try_except_handler_17; - } - exception_type = tmp_raise_type_6; - Py_INCREF(tmp_raise_type_6); - exception_value = tmp_raise_value_6; - exception_lineno = 168; - RAISE_EXCEPTION_IMPLICIT(&exception_type, &exception_value, &exception_tb); - - goto try_except_handler_17; - } - branch_no_23:; - goto branch_end_22; - branch_no_22:; - { - PyObject *tmp_assign_source_59; - tmp_assign_source_59 = PyDict_New(); - assert(tmp_class_creation_6__prepared == NULL); - tmp_class_creation_6__prepared = tmp_assign_source_59; - } - branch_end_22:; - { - PyObject *tmp_assign_source_60; - { - PyObject *tmp_set_locals_6; - CHECK_OBJECT(tmp_class_creation_6__prepared); - tmp_set_locals_6 = tmp_class_creation_6__prepared; - locals_models$unet3d$losses$$$class__6_BCEDiceLoss_168 = tmp_set_locals_6; - Py_INCREF(tmp_set_locals_6); - } - // Tried code: - // Tried code: - tmp_dictset_value = GET_STRING_DICT_VALUE(moduledict_models$unet3d$losses, (Nuitka_StringObject *)mod_consts[143]); - - if (unlikely(tmp_dictset_value == NULL)) { - tmp_dictset_value = GET_MODULE_VARIABLE_VALUE_FALLBACK(mod_consts[143]); - } - - assert(!(tmp_dictset_value == NULL)); - tmp_res = PyObject_SetItem(locals_models$unet3d$losses$$$class__6_BCEDiceLoss_168, mod_consts[145], tmp_dictset_value); - if (tmp_res != 0) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 168; - - goto try_except_handler_19; - } - tmp_dictset_value = mod_consts[167]; - tmp_res = PyObject_SetItem(locals_models$unet3d$losses$$$class__6_BCEDiceLoss_168, mod_consts[121], tmp_dictset_value); - if (tmp_res != 0) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 168; - - goto try_except_handler_19; - } - tmp_dictset_value = mod_consts[53]; - tmp_res = PyObject_SetItem(locals_models$unet3d$losses$$$class__6_BCEDiceLoss_168, mod_consts[147], tmp_dictset_value); - if (tmp_res != 0) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 168; - - goto try_except_handler_19; - } - if (isFrameUnusable(cache_frame_79c7d5960b91f122e38985085658fe13_7)) { - Py_XDECREF(cache_frame_79c7d5960b91f122e38985085658fe13_7); - -#if _DEBUG_REFCOUNTS - if (cache_frame_79c7d5960b91f122e38985085658fe13_7 == NULL) { - count_active_frame_cache_instances += 1; - } else { - count_released_frame_cache_instances += 1; - } - count_allocated_frame_cache_instances += 1; -#endif - cache_frame_79c7d5960b91f122e38985085658fe13_7 = MAKE_FUNCTION_FRAME(codeobj_79c7d5960b91f122e38985085658fe13, module_models$unet3d$losses, sizeof(void *)); -#if _DEBUG_REFCOUNTS - } else { - count_hit_frame_cache_instances += 1; -#endif - } - assert(cache_frame_79c7d5960b91f122e38985085658fe13_7->m_type_description == NULL); - frame_79c7d5960b91f122e38985085658fe13_7 = cache_frame_79c7d5960b91f122e38985085658fe13_7; - - // Push the new frame as the currently active one. - pushFrameStack(frame_79c7d5960b91f122e38985085658fe13_7); - - // Mark the frame object as in use, ref count 1 will be up for reuse. - assert(Py_REFCNT(frame_79c7d5960b91f122e38985085658fe13_7) == 2); // Frame stack - - // Framed code: - - - tmp_dictset_value = MAKE_FUNCTION_models$unet3d$losses$$$function__13___init__(); - - tmp_res = PyObject_SetItem(locals_models$unet3d$losses$$$class__6_BCEDiceLoss_168, mod_consts[13], tmp_dictset_value); - Py_DECREF(tmp_dictset_value); - if (tmp_res != 0) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 171; - type_description_2 = "o"; - goto frame_exception_exit_7; - } - - - tmp_dictset_value = MAKE_FUNCTION_models$unet3d$losses$$$function__14_forward(); - - tmp_res = PyObject_SetItem(locals_models$unet3d$losses$$$class__6_BCEDiceLoss_168, mod_consts[82], tmp_dictset_value); - Py_DECREF(tmp_dictset_value); - if (tmp_res != 0) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 178; - type_description_2 = "o"; - goto frame_exception_exit_7; - } - -#if 0 - RESTORE_FRAME_EXCEPTION(frame_79c7d5960b91f122e38985085658fe13_7); -#endif - - // Put the previous frame back on top. - popFrameStack(); - - goto frame_no_exception_6; - - frame_exception_exit_7:; - -#if 0 - RESTORE_FRAME_EXCEPTION(frame_79c7d5960b91f122e38985085658fe13_7); -#endif - - if (exception_tb == NULL) { - exception_tb = MAKE_TRACEBACK(frame_79c7d5960b91f122e38985085658fe13_7, exception_lineno); - } else if (exception_tb->tb_frame != &frame_79c7d5960b91f122e38985085658fe13_7->m_frame) { - exception_tb = ADD_TRACEBACK(exception_tb, frame_79c7d5960b91f122e38985085658fe13_7, exception_lineno); - } - - // Attaches locals to frame if any. - Nuitka_Frame_AttachLocals( - frame_79c7d5960b91f122e38985085658fe13_7, - type_description_2, - outline_5_var___class__ - ); - - - // Release cached frame if used for exception. - if (frame_79c7d5960b91f122e38985085658fe13_7 == cache_frame_79c7d5960b91f122e38985085658fe13_7) { -#if _DEBUG_REFCOUNTS - count_active_frame_cache_instances -= 1; - count_released_frame_cache_instances += 1; -#endif - - Py_DECREF(cache_frame_79c7d5960b91f122e38985085658fe13_7); - cache_frame_79c7d5960b91f122e38985085658fe13_7 = NULL; - } - - assertFrameObject(frame_79c7d5960b91f122e38985085658fe13_7); - - // Put the previous frame back on top. - popFrameStack(); - - // Return the error. - goto nested_frame_exit_6; - - frame_no_exception_6:; - goto skip_nested_handling_6; - nested_frame_exit_6:; - - goto try_except_handler_19; - skip_nested_handling_6:; - { - nuitka_bool tmp_condition_result_36; - PyObject *tmp_compexpr_left_6; - PyObject *tmp_compexpr_right_6; - CHECK_OBJECT(tmp_class_creation_6__bases); - tmp_compexpr_left_6 = tmp_class_creation_6__bases; - CHECK_OBJECT(tmp_class_creation_6__bases_orig); - tmp_compexpr_right_6 = tmp_class_creation_6__bases_orig; - tmp_condition_result_36 = RICH_COMPARE_NE_NBOOL_OBJECT_TUPLE(tmp_compexpr_left_6, tmp_compexpr_right_6); - if (tmp_condition_result_36 == NUITKA_BOOL_EXCEPTION) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 168; - - goto try_except_handler_19; - } - if (tmp_condition_result_36 == NUITKA_BOOL_TRUE) { - goto branch_yes_24; - } else { - goto branch_no_24; - } - assert(tmp_condition_result_36 != NUITKA_BOOL_UNASSIGNED); - } - branch_yes_24:; - CHECK_OBJECT(tmp_class_creation_6__bases_orig); - tmp_dictset_value = tmp_class_creation_6__bases_orig; - tmp_res = PyObject_SetItem(locals_models$unet3d$losses$$$class__6_BCEDiceLoss_168, mod_consts[150], tmp_dictset_value); - if (tmp_res != 0) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 168; - - goto try_except_handler_19; - } - branch_no_24:; - { - PyObject *tmp_assign_source_61; - PyObject *tmp_called_name_12; - PyObject *tmp_args_name_12; - PyObject *tmp_tuple_element_24; - PyObject *tmp_kwargs_name_12; - CHECK_OBJECT(tmp_class_creation_6__metaclass); - tmp_called_name_12 = tmp_class_creation_6__metaclass; - tmp_tuple_element_24 = mod_consts[53]; - tmp_args_name_12 = PyTuple_New(3); - PyTuple_SET_ITEM0(tmp_args_name_12, 0, tmp_tuple_element_24); - CHECK_OBJECT(tmp_class_creation_6__bases); - tmp_tuple_element_24 = tmp_class_creation_6__bases; - PyTuple_SET_ITEM0(tmp_args_name_12, 1, tmp_tuple_element_24); - tmp_tuple_element_24 = locals_models$unet3d$losses$$$class__6_BCEDiceLoss_168; - PyTuple_SET_ITEM0(tmp_args_name_12, 2, tmp_tuple_element_24); - CHECK_OBJECT(tmp_class_creation_6__class_decl_dict); - tmp_kwargs_name_12 = tmp_class_creation_6__class_decl_dict; - frame_705bf4315d2d4f531dff5d3d03b1beec->m_frame.f_lineno = 168; - tmp_assign_source_61 = CALL_FUNCTION(tmp_called_name_12, tmp_args_name_12, tmp_kwargs_name_12); - Py_DECREF(tmp_args_name_12); - if (tmp_assign_source_61 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 168; - - goto try_except_handler_19; - } - assert(outline_5_var___class__ == NULL); - outline_5_var___class__ = tmp_assign_source_61; - } - CHECK_OBJECT(outline_5_var___class__); - tmp_assign_source_60 = outline_5_var___class__; - Py_INCREF(tmp_assign_source_60); - goto try_return_handler_19; - NUITKA_CANNOT_GET_HERE("tried codes exits in all cases"); - return NULL; - // Return handler code: - try_return_handler_19:; - Py_DECREF(locals_models$unet3d$losses$$$class__6_BCEDiceLoss_168); - locals_models$unet3d$losses$$$class__6_BCEDiceLoss_168 = NULL; - goto try_return_handler_18; - // Exception handler code: - try_except_handler_19:; - exception_keeper_type_17 = exception_type; - exception_keeper_value_17 = exception_value; - exception_keeper_tb_17 = exception_tb; - exception_keeper_lineno_17 = exception_lineno; - exception_type = NULL; - exception_value = NULL; - exception_tb = NULL; - exception_lineno = 0; - - Py_DECREF(locals_models$unet3d$losses$$$class__6_BCEDiceLoss_168); - locals_models$unet3d$losses$$$class__6_BCEDiceLoss_168 = NULL; - // Re-raise. - exception_type = exception_keeper_type_17; - exception_value = exception_keeper_value_17; - exception_tb = exception_keeper_tb_17; - exception_lineno = exception_keeper_lineno_17; - - goto try_except_handler_18; - // End of try: - NUITKA_CANNOT_GET_HERE("tried codes exits in all cases"); - return NULL; - // Return handler code: - try_return_handler_18:; - CHECK_OBJECT(outline_5_var___class__); - Py_DECREF(outline_5_var___class__); - outline_5_var___class__ = NULL; - goto outline_result_6; - // Exception handler code: - try_except_handler_18:; - exception_keeper_type_18 = exception_type; - exception_keeper_value_18 = exception_value; - exception_keeper_tb_18 = exception_tb; - exception_keeper_lineno_18 = exception_lineno; - exception_type = NULL; - exception_value = NULL; - exception_tb = NULL; - exception_lineno = 0; - - // Re-raise. - exception_type = exception_keeper_type_18; - exception_value = exception_keeper_value_18; - exception_tb = exception_keeper_tb_18; - exception_lineno = exception_keeper_lineno_18; - - goto outline_exception_6; - // End of try: - NUITKA_CANNOT_GET_HERE("Return statement must have exited already."); - return NULL; - outline_exception_6:; - exception_lineno = 168; - goto try_except_handler_17; - outline_result_6:; - UPDATE_STRING_DICT1(moduledict_models$unet3d$losses, (Nuitka_StringObject *)mod_consts[53], tmp_assign_source_60); - } - goto try_end_7; - // Exception handler code: - try_except_handler_17:; - exception_keeper_type_19 = exception_type; - exception_keeper_value_19 = exception_value; - exception_keeper_tb_19 = exception_tb; - exception_keeper_lineno_19 = exception_lineno; - exception_type = NULL; - exception_value = NULL; - exception_tb = NULL; - exception_lineno = 0; - - Py_XDECREF(tmp_class_creation_6__bases_orig); - tmp_class_creation_6__bases_orig = NULL; - Py_XDECREF(tmp_class_creation_6__bases); - tmp_class_creation_6__bases = NULL; - Py_XDECREF(tmp_class_creation_6__class_decl_dict); - tmp_class_creation_6__class_decl_dict = NULL; - Py_XDECREF(tmp_class_creation_6__metaclass); - tmp_class_creation_6__metaclass = NULL; - Py_XDECREF(tmp_class_creation_6__prepared); - tmp_class_creation_6__prepared = NULL; - // Re-raise. - exception_type = exception_keeper_type_19; - exception_value = exception_keeper_value_19; - exception_tb = exception_keeper_tb_19; - exception_lineno = exception_keeper_lineno_19; - - goto frame_exception_exit_1; - // End of try: - try_end_7:; - CHECK_OBJECT(tmp_class_creation_6__bases_orig); - Py_DECREF(tmp_class_creation_6__bases_orig); - tmp_class_creation_6__bases_orig = NULL; - Py_XDECREF(tmp_class_creation_6__bases); - tmp_class_creation_6__bases = NULL; - Py_XDECREF(tmp_class_creation_6__class_decl_dict); - tmp_class_creation_6__class_decl_dict = NULL; - Py_XDECREF(tmp_class_creation_6__metaclass); - tmp_class_creation_6__metaclass = NULL; - CHECK_OBJECT(tmp_class_creation_6__prepared); - Py_DECREF(tmp_class_creation_6__prepared); - tmp_class_creation_6__prepared = NULL; - // Tried code: - { - PyObject *tmp_assign_source_62; - PyObject *tmp_tuple_element_25; - PyObject *tmp_expression_name_35; - tmp_expression_name_35 = GET_STRING_DICT_VALUE(moduledict_models$unet3d$losses, (Nuitka_StringObject *)mod_consts[36]); - - if (unlikely(tmp_expression_name_35 == NULL)) { - tmp_expression_name_35 = GET_MODULE_VARIABLE_VALUE_FALLBACK(mod_consts[36]); - } - - if (tmp_expression_name_35 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 182; - - goto try_except_handler_20; - } - tmp_tuple_element_25 = LOOKUP_ATTRIBUTE(tmp_expression_name_35, mod_consts[138]); - if (tmp_tuple_element_25 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 182; - - goto try_except_handler_20; - } - tmp_assign_source_62 = PyTuple_New(1); - PyTuple_SET_ITEM(tmp_assign_source_62, 0, tmp_tuple_element_25); - assert(tmp_class_creation_7__bases_orig == NULL); - tmp_class_creation_7__bases_orig = tmp_assign_source_62; - } - { - PyObject *tmp_assign_source_63; - PyObject *tmp_dircall_arg1_7; - CHECK_OBJECT(tmp_class_creation_7__bases_orig); - tmp_dircall_arg1_7 = tmp_class_creation_7__bases_orig; - Py_INCREF(tmp_dircall_arg1_7); - - { - PyObject *dir_call_args[] = {tmp_dircall_arg1_7}; - tmp_assign_source_63 = impl_models$$$function__1__mro_entries_conversion(dir_call_args); - } - if (tmp_assign_source_63 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 182; - - goto try_except_handler_20; - } - assert(tmp_class_creation_7__bases == NULL); - tmp_class_creation_7__bases = tmp_assign_source_63; - } - { - PyObject *tmp_assign_source_64; - tmp_assign_source_64 = PyDict_New(); - assert(tmp_class_creation_7__class_decl_dict == NULL); - tmp_class_creation_7__class_decl_dict = tmp_assign_source_64; - } - { - PyObject *tmp_assign_source_65; - PyObject *tmp_metaclass_name_7; - nuitka_bool tmp_condition_result_37; - PyObject *tmp_key_name_19; - PyObject *tmp_dict_arg_name_19; - PyObject *tmp_dict_arg_name_20; - PyObject *tmp_key_name_20; - nuitka_bool tmp_condition_result_38; - int tmp_truth_name_7; - PyObject *tmp_type_arg_13; - PyObject *tmp_expression_name_36; - PyObject *tmp_subscript_name_7; - PyObject *tmp_bases_name_7; - tmp_key_name_19 = mod_consts[139]; - CHECK_OBJECT(tmp_class_creation_7__class_decl_dict); - tmp_dict_arg_name_19 = tmp_class_creation_7__class_decl_dict; - tmp_res = DICT_HAS_ITEM(tmp_dict_arg_name_19, tmp_key_name_19); - assert(!(tmp_res == -1)); - tmp_condition_result_37 = (tmp_res != 0) ? NUITKA_BOOL_TRUE : NUITKA_BOOL_FALSE; - if (tmp_condition_result_37 == NUITKA_BOOL_TRUE) { - goto condexpr_true_13; - } else { - goto condexpr_false_13; - } - condexpr_true_13:; - CHECK_OBJECT(tmp_class_creation_7__class_decl_dict); - tmp_dict_arg_name_20 = tmp_class_creation_7__class_decl_dict; - tmp_key_name_20 = mod_consts[139]; - tmp_metaclass_name_7 = DICT_GET_ITEM_WITH_ERROR(tmp_dict_arg_name_20, tmp_key_name_20); - if (tmp_metaclass_name_7 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 182; - - goto try_except_handler_20; - } - goto condexpr_end_13; - condexpr_false_13:; - CHECK_OBJECT(tmp_class_creation_7__bases); - tmp_truth_name_7 = CHECK_IF_TRUE(tmp_class_creation_7__bases); - if (tmp_truth_name_7 == -1) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 182; - - goto try_except_handler_20; - } - tmp_condition_result_38 = tmp_truth_name_7 == 0 ? NUITKA_BOOL_FALSE : NUITKA_BOOL_TRUE; - if (tmp_condition_result_38 == NUITKA_BOOL_TRUE) { - goto condexpr_true_14; - } else { - goto condexpr_false_14; - } - condexpr_true_14:; - CHECK_OBJECT(tmp_class_creation_7__bases); - tmp_expression_name_36 = tmp_class_creation_7__bases; - tmp_subscript_name_7 = mod_consts[127]; - tmp_type_arg_13 = LOOKUP_SUBSCRIPT_CONST(tmp_expression_name_36, tmp_subscript_name_7, 0); - if (tmp_type_arg_13 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 182; - - goto try_except_handler_20; - } - tmp_metaclass_name_7 = BUILTIN_TYPE1(tmp_type_arg_13); - Py_DECREF(tmp_type_arg_13); - if (tmp_metaclass_name_7 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 182; - - goto try_except_handler_20; - } - goto condexpr_end_14; - condexpr_false_14:; - tmp_metaclass_name_7 = (PyObject *)&PyType_Type; - Py_INCREF(tmp_metaclass_name_7); - condexpr_end_14:; - condexpr_end_13:; - CHECK_OBJECT(tmp_class_creation_7__bases); - tmp_bases_name_7 = tmp_class_creation_7__bases; - tmp_assign_source_65 = SELECT_METACLASS(tmp_metaclass_name_7, tmp_bases_name_7); - Py_DECREF(tmp_metaclass_name_7); - if (tmp_assign_source_65 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 182; - - goto try_except_handler_20; - } - assert(tmp_class_creation_7__metaclass == NULL); - tmp_class_creation_7__metaclass = tmp_assign_source_65; - } - { - nuitka_bool tmp_condition_result_39; - PyObject *tmp_key_name_21; - PyObject *tmp_dict_arg_name_21; - tmp_key_name_21 = mod_consts[139]; - CHECK_OBJECT(tmp_class_creation_7__class_decl_dict); - tmp_dict_arg_name_21 = tmp_class_creation_7__class_decl_dict; - tmp_res = DICT_HAS_ITEM(tmp_dict_arg_name_21, tmp_key_name_21); - assert(!(tmp_res == -1)); - tmp_condition_result_39 = (tmp_res != 0) ? NUITKA_BOOL_TRUE : NUITKA_BOOL_FALSE; - if (tmp_condition_result_39 == NUITKA_BOOL_TRUE) { - goto branch_yes_25; - } else { - goto branch_no_25; - } - } - branch_yes_25:; - CHECK_OBJECT(tmp_class_creation_7__class_decl_dict); - tmp_dictdel_dict = tmp_class_creation_7__class_decl_dict; - tmp_dictdel_key = mod_consts[139]; - tmp_result = DICT_REMOVE_ITEM(tmp_dictdel_dict, tmp_dictdel_key); - if (tmp_result == false) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 182; - - goto try_except_handler_20; - } - branch_no_25:; - { - nuitka_bool tmp_condition_result_40; - PyObject *tmp_expression_name_37; - CHECK_OBJECT(tmp_class_creation_7__metaclass); - tmp_expression_name_37 = tmp_class_creation_7__metaclass; - tmp_result = HAS_ATTR_BOOL(tmp_expression_name_37, mod_consts[140]); - tmp_condition_result_40 = (tmp_result) ? NUITKA_BOOL_TRUE : NUITKA_BOOL_FALSE; - if (tmp_condition_result_40 == NUITKA_BOOL_TRUE) { - goto branch_yes_26; - } else { - goto branch_no_26; - } - } - branch_yes_26:; - { - PyObject *tmp_assign_source_66; - PyObject *tmp_called_name_13; - PyObject *tmp_expression_name_38; - PyObject *tmp_args_name_13; - PyObject *tmp_tuple_element_26; - PyObject *tmp_kwargs_name_13; - CHECK_OBJECT(tmp_class_creation_7__metaclass); - tmp_expression_name_38 = tmp_class_creation_7__metaclass; - tmp_called_name_13 = LOOKUP_ATTRIBUTE(tmp_expression_name_38, mod_consts[140]); - if (tmp_called_name_13 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 182; - - goto try_except_handler_20; - } - tmp_tuple_element_26 = mod_consts[59]; - tmp_args_name_13 = PyTuple_New(2); - PyTuple_SET_ITEM0(tmp_args_name_13, 0, tmp_tuple_element_26); - CHECK_OBJECT(tmp_class_creation_7__bases); - tmp_tuple_element_26 = tmp_class_creation_7__bases; - PyTuple_SET_ITEM0(tmp_args_name_13, 1, tmp_tuple_element_26); - CHECK_OBJECT(tmp_class_creation_7__class_decl_dict); - tmp_kwargs_name_13 = tmp_class_creation_7__class_decl_dict; - frame_705bf4315d2d4f531dff5d3d03b1beec->m_frame.f_lineno = 182; - tmp_assign_source_66 = CALL_FUNCTION(tmp_called_name_13, tmp_args_name_13, tmp_kwargs_name_13); - Py_DECREF(tmp_called_name_13); - Py_DECREF(tmp_args_name_13); - if (tmp_assign_source_66 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 182; - - goto try_except_handler_20; - } - assert(tmp_class_creation_7__prepared == NULL); - tmp_class_creation_7__prepared = tmp_assign_source_66; - } - { - nuitka_bool tmp_condition_result_41; - PyObject *tmp_operand_name_7; - PyObject *tmp_expression_name_39; - CHECK_OBJECT(tmp_class_creation_7__prepared); - tmp_expression_name_39 = tmp_class_creation_7__prepared; - tmp_result = HAS_ATTR_BOOL(tmp_expression_name_39, mod_consts[141]); - tmp_operand_name_7 = (tmp_result) ? Py_True : Py_False; - tmp_res = CHECK_IF_TRUE(tmp_operand_name_7); - if (tmp_res == -1) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 182; - - goto try_except_handler_20; - } - tmp_condition_result_41 = (tmp_res == 0) ? NUITKA_BOOL_TRUE : NUITKA_BOOL_FALSE; - if (tmp_condition_result_41 == NUITKA_BOOL_TRUE) { - goto branch_yes_27; - } else { - goto branch_no_27; - } - } - branch_yes_27:; - { - PyObject *tmp_raise_type_7; - PyObject *tmp_raise_value_7; - PyObject *tmp_left_name_7; - PyObject *tmp_right_name_7; - PyObject *tmp_tuple_element_27; - PyObject *tmp_getattr_target_7; - PyObject *tmp_getattr_attr_7; - PyObject *tmp_getattr_default_7; - tmp_raise_type_7 = PyExc_TypeError; - tmp_left_name_7 = mod_consts[142]; - CHECK_OBJECT(tmp_class_creation_7__metaclass); - tmp_getattr_target_7 = tmp_class_creation_7__metaclass; - tmp_getattr_attr_7 = mod_consts[143]; - tmp_getattr_default_7 = mod_consts[144]; - tmp_tuple_element_27 = BUILTIN_GETATTR(tmp_getattr_target_7, tmp_getattr_attr_7, tmp_getattr_default_7); - if (tmp_tuple_element_27 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 182; - - goto try_except_handler_20; - } - tmp_right_name_7 = PyTuple_New(2); - { - PyObject *tmp_expression_name_40; - PyObject *tmp_type_arg_14; - PyTuple_SET_ITEM(tmp_right_name_7, 0, tmp_tuple_element_27); - CHECK_OBJECT(tmp_class_creation_7__prepared); - tmp_type_arg_14 = tmp_class_creation_7__prepared; - tmp_expression_name_40 = BUILTIN_TYPE1(tmp_type_arg_14); - assert(!(tmp_expression_name_40 == NULL)); - tmp_tuple_element_27 = LOOKUP_ATTRIBUTE(tmp_expression_name_40, mod_consts[143]); - Py_DECREF(tmp_expression_name_40); - if (tmp_tuple_element_27 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 182; - - goto tuple_build_exception_7; - } - PyTuple_SET_ITEM(tmp_right_name_7, 1, tmp_tuple_element_27); - } - goto tuple_build_noexception_7; - // Exception handling pass through code for tuple_build: - tuple_build_exception_7:; - Py_DECREF(tmp_right_name_7); - goto try_except_handler_20; - // Finished with no exception for tuple_build: - tuple_build_noexception_7:; - tmp_raise_value_7 = BINARY_OPERATION_MOD_OBJECT_UNICODE_TUPLE(tmp_left_name_7, tmp_right_name_7); - Py_DECREF(tmp_right_name_7); - if (tmp_raise_value_7 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 182; - - goto try_except_handler_20; - } - exception_type = tmp_raise_type_7; - Py_INCREF(tmp_raise_type_7); - exception_value = tmp_raise_value_7; - exception_lineno = 182; - RAISE_EXCEPTION_IMPLICIT(&exception_type, &exception_value, &exception_tb); - - goto try_except_handler_20; - } - branch_no_27:; - goto branch_end_26; - branch_no_26:; - { - PyObject *tmp_assign_source_67; - tmp_assign_source_67 = PyDict_New(); - assert(tmp_class_creation_7__prepared == NULL); - tmp_class_creation_7__prepared = tmp_assign_source_67; - } - branch_end_26:; - { - PyObject *tmp_assign_source_68; - { - PyObject *tmp_set_locals_7; - CHECK_OBJECT(tmp_class_creation_7__prepared); - tmp_set_locals_7 = tmp_class_creation_7__prepared; - locals_models$unet3d$losses$$$class__7_WeightedCrossEntropyLoss_182 = tmp_set_locals_7; - Py_INCREF(tmp_set_locals_7); - } - // Tried code: - // Tried code: - tmp_dictset_value = GET_STRING_DICT_VALUE(moduledict_models$unet3d$losses, (Nuitka_StringObject *)mod_consts[143]); - - if (unlikely(tmp_dictset_value == NULL)) { - tmp_dictset_value = GET_MODULE_VARIABLE_VALUE_FALLBACK(mod_consts[143]); - } - - assert(!(tmp_dictset_value == NULL)); - tmp_res = PyObject_SetItem(locals_models$unet3d$losses$$$class__7_WeightedCrossEntropyLoss_182, mod_consts[145], tmp_dictset_value); - if (tmp_res != 0) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 182; - - goto try_except_handler_22; - } - tmp_dictset_value = mod_consts[170]; - tmp_res = PyObject_SetItem(locals_models$unet3d$losses$$$class__7_WeightedCrossEntropyLoss_182, mod_consts[121], tmp_dictset_value); - if (tmp_res != 0) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 182; - - goto try_except_handler_22; - } - tmp_dictset_value = mod_consts[59]; - tmp_res = PyObject_SetItem(locals_models$unet3d$losses$$$class__7_WeightedCrossEntropyLoss_182, mod_consts[147], tmp_dictset_value); - if (tmp_res != 0) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 182; - - goto try_except_handler_22; - } - if (isFrameUnusable(cache_frame_b82f846403c5bbd1de1ab21ea54bad05_8)) { - Py_XDECREF(cache_frame_b82f846403c5bbd1de1ab21ea54bad05_8); - -#if _DEBUG_REFCOUNTS - if (cache_frame_b82f846403c5bbd1de1ab21ea54bad05_8 == NULL) { - count_active_frame_cache_instances += 1; - } else { - count_released_frame_cache_instances += 1; - } - count_allocated_frame_cache_instances += 1; -#endif - cache_frame_b82f846403c5bbd1de1ab21ea54bad05_8 = MAKE_FUNCTION_FRAME(codeobj_b82f846403c5bbd1de1ab21ea54bad05, module_models$unet3d$losses, sizeof(void *)); -#if _DEBUG_REFCOUNTS - } else { - count_hit_frame_cache_instances += 1; -#endif - } - assert(cache_frame_b82f846403c5bbd1de1ab21ea54bad05_8->m_type_description == NULL); - frame_b82f846403c5bbd1de1ab21ea54bad05_8 = cache_frame_b82f846403c5bbd1de1ab21ea54bad05_8; - - // Push the new frame as the currently active one. - pushFrameStack(frame_b82f846403c5bbd1de1ab21ea54bad05_8); - - // Mark the frame object as in use, ref count 1 will be up for reuse. - assert(Py_REFCNT(frame_b82f846403c5bbd1de1ab21ea54bad05_8) == 2); // Frame stack - - // Framed code: - { - PyObject *tmp_defaults_6; - tmp_defaults_6 = mod_consts[7]; - Py_INCREF(tmp_defaults_6); - - - tmp_dictset_value = MAKE_FUNCTION_models$unet3d$losses$$$function__15___init__(tmp_defaults_6); - - tmp_res = PyObject_SetItem(locals_models$unet3d$losses$$$class__7_WeightedCrossEntropyLoss_182, mod_consts[13], tmp_dictset_value); - Py_DECREF(tmp_dictset_value); - if (tmp_res != 0) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 186; - type_description_2 = "o"; - goto frame_exception_exit_8; - } - } - - - tmp_dictset_value = MAKE_FUNCTION_models$unet3d$losses$$$function__16_forward(); - - tmp_res = PyObject_SetItem(locals_models$unet3d$losses$$$class__7_WeightedCrossEntropyLoss_182, mod_consts[82], tmp_dictset_value); - Py_DECREF(tmp_dictset_value); - if (tmp_res != 0) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 190; - type_description_2 = "o"; - goto frame_exception_exit_8; - } - { - nuitka_bool tmp_condition_result_42; - PyObject *tmp_called_name_14; - PyObject *tmp_args_element_name_1; - PyObject *tmp_staticmethod_arg_1; - tmp_res = MAPPING_HAS_ITEM(locals_models$unet3d$losses$$$class__7_WeightedCrossEntropyLoss_182, mod_consts[173]); - - if (tmp_res == -1) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 194; - type_description_2 = "o"; - goto frame_exception_exit_8; - } - tmp_condition_result_42 = (tmp_res == 1) ? NUITKA_BOOL_TRUE : NUITKA_BOOL_FALSE; - if (tmp_condition_result_42 == NUITKA_BOOL_TRUE) { - goto condexpr_true_15; - } else { - goto condexpr_false_15; - } - condexpr_true_15:; - tmp_called_name_14 = PyObject_GetItem(locals_models$unet3d$losses$$$class__7_WeightedCrossEntropyLoss_182, mod_consts[173]); - - if (unlikely(tmp_called_name_14 == NULL && CHECK_AND_CLEAR_KEY_ERROR_OCCURRED())) { - - FORMAT_NAME_ERROR(&exception_type, &exception_value, mod_consts[173]); - NORMALIZE_EXCEPTION(&exception_type, &exception_value, &exception_tb); - CHAIN_EXCEPTION(exception_value); - - exception_lineno = 194; - type_description_2 = "o"; - goto frame_exception_exit_8; - } - - if (tmp_called_name_14 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 194; - type_description_2 = "o"; - goto frame_exception_exit_8; - } - - - tmp_args_element_name_1 = MAKE_FUNCTION_models$unet3d$losses$$$function__17__class_weights(); - - frame_b82f846403c5bbd1de1ab21ea54bad05_8->m_frame.f_lineno = 194; - tmp_dictset_value = CALL_FUNCTION_WITH_SINGLE_ARG(tmp_called_name_14, tmp_args_element_name_1); - Py_DECREF(tmp_called_name_14); - Py_DECREF(tmp_args_element_name_1); - if (tmp_dictset_value == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 194; - type_description_2 = "o"; - goto frame_exception_exit_8; - } - goto condexpr_end_15; - condexpr_false_15:; - - - tmp_staticmethod_arg_1 = MAKE_FUNCTION_models$unet3d$losses$$$function__17__class_weights(); - - tmp_dictset_value = BUILTIN_STATICMETHOD(tmp_staticmethod_arg_1); - Py_DECREF(tmp_staticmethod_arg_1); - assert(!(tmp_dictset_value == NULL)); - condexpr_end_15:; - tmp_res = PyObject_SetItem(locals_models$unet3d$losses$$$class__7_WeightedCrossEntropyLoss_182, mod_consts[60], tmp_dictset_value); - Py_DECREF(tmp_dictset_value); - if (tmp_res != 0) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 195; - type_description_2 = "o"; - goto frame_exception_exit_8; - } - } - -#if 0 - RESTORE_FRAME_EXCEPTION(frame_b82f846403c5bbd1de1ab21ea54bad05_8); -#endif - - // Put the previous frame back on top. - popFrameStack(); - - goto frame_no_exception_7; - - frame_exception_exit_8:; - -#if 0 - RESTORE_FRAME_EXCEPTION(frame_b82f846403c5bbd1de1ab21ea54bad05_8); -#endif - - if (exception_tb == NULL) { - exception_tb = MAKE_TRACEBACK(frame_b82f846403c5bbd1de1ab21ea54bad05_8, exception_lineno); - } else if (exception_tb->tb_frame != &frame_b82f846403c5bbd1de1ab21ea54bad05_8->m_frame) { - exception_tb = ADD_TRACEBACK(exception_tb, frame_b82f846403c5bbd1de1ab21ea54bad05_8, exception_lineno); - } - - // Attaches locals to frame if any. - Nuitka_Frame_AttachLocals( - frame_b82f846403c5bbd1de1ab21ea54bad05_8, - type_description_2, - outline_6_var___class__ - ); - - - // Release cached frame if used for exception. - if (frame_b82f846403c5bbd1de1ab21ea54bad05_8 == cache_frame_b82f846403c5bbd1de1ab21ea54bad05_8) { -#if _DEBUG_REFCOUNTS - count_active_frame_cache_instances -= 1; - count_released_frame_cache_instances += 1; -#endif - - Py_DECREF(cache_frame_b82f846403c5bbd1de1ab21ea54bad05_8); - cache_frame_b82f846403c5bbd1de1ab21ea54bad05_8 = NULL; - } - - assertFrameObject(frame_b82f846403c5bbd1de1ab21ea54bad05_8); - - // Put the previous frame back on top. - popFrameStack(); - - // Return the error. - goto nested_frame_exit_7; - - frame_no_exception_7:; - goto skip_nested_handling_7; - nested_frame_exit_7:; - - goto try_except_handler_22; - skip_nested_handling_7:; - { - nuitka_bool tmp_condition_result_43; - PyObject *tmp_compexpr_left_7; - PyObject *tmp_compexpr_right_7; - CHECK_OBJECT(tmp_class_creation_7__bases); - tmp_compexpr_left_7 = tmp_class_creation_7__bases; - CHECK_OBJECT(tmp_class_creation_7__bases_orig); - tmp_compexpr_right_7 = tmp_class_creation_7__bases_orig; - tmp_condition_result_43 = RICH_COMPARE_NE_NBOOL_OBJECT_TUPLE(tmp_compexpr_left_7, tmp_compexpr_right_7); - if (tmp_condition_result_43 == NUITKA_BOOL_EXCEPTION) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 182; - - goto try_except_handler_22; - } - if (tmp_condition_result_43 == NUITKA_BOOL_TRUE) { - goto branch_yes_28; - } else { - goto branch_no_28; - } - assert(tmp_condition_result_43 != NUITKA_BOOL_UNASSIGNED); - } - branch_yes_28:; - CHECK_OBJECT(tmp_class_creation_7__bases_orig); - tmp_dictset_value = tmp_class_creation_7__bases_orig; - tmp_res = PyObject_SetItem(locals_models$unet3d$losses$$$class__7_WeightedCrossEntropyLoss_182, mod_consts[150], tmp_dictset_value); - if (tmp_res != 0) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 182; - - goto try_except_handler_22; - } - branch_no_28:; - { - PyObject *tmp_assign_source_69; - PyObject *tmp_called_name_15; - PyObject *tmp_args_name_14; - PyObject *tmp_tuple_element_28; - PyObject *tmp_kwargs_name_14; - CHECK_OBJECT(tmp_class_creation_7__metaclass); - tmp_called_name_15 = tmp_class_creation_7__metaclass; - tmp_tuple_element_28 = mod_consts[59]; - tmp_args_name_14 = PyTuple_New(3); - PyTuple_SET_ITEM0(tmp_args_name_14, 0, tmp_tuple_element_28); - CHECK_OBJECT(tmp_class_creation_7__bases); - tmp_tuple_element_28 = tmp_class_creation_7__bases; - PyTuple_SET_ITEM0(tmp_args_name_14, 1, tmp_tuple_element_28); - tmp_tuple_element_28 = locals_models$unet3d$losses$$$class__7_WeightedCrossEntropyLoss_182; - PyTuple_SET_ITEM0(tmp_args_name_14, 2, tmp_tuple_element_28); - CHECK_OBJECT(tmp_class_creation_7__class_decl_dict); - tmp_kwargs_name_14 = tmp_class_creation_7__class_decl_dict; - frame_705bf4315d2d4f531dff5d3d03b1beec->m_frame.f_lineno = 182; - tmp_assign_source_69 = CALL_FUNCTION(tmp_called_name_15, tmp_args_name_14, tmp_kwargs_name_14); - Py_DECREF(tmp_args_name_14); - if (tmp_assign_source_69 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 182; - - goto try_except_handler_22; - } - assert(outline_6_var___class__ == NULL); - outline_6_var___class__ = tmp_assign_source_69; - } - CHECK_OBJECT(outline_6_var___class__); - tmp_assign_source_68 = outline_6_var___class__; - Py_INCREF(tmp_assign_source_68); - goto try_return_handler_22; - NUITKA_CANNOT_GET_HERE("tried codes exits in all cases"); - return NULL; - // Return handler code: - try_return_handler_22:; - Py_DECREF(locals_models$unet3d$losses$$$class__7_WeightedCrossEntropyLoss_182); - locals_models$unet3d$losses$$$class__7_WeightedCrossEntropyLoss_182 = NULL; - goto try_return_handler_21; - // Exception handler code: - try_except_handler_22:; - exception_keeper_type_20 = exception_type; - exception_keeper_value_20 = exception_value; - exception_keeper_tb_20 = exception_tb; - exception_keeper_lineno_20 = exception_lineno; - exception_type = NULL; - exception_value = NULL; - exception_tb = NULL; - exception_lineno = 0; - - Py_DECREF(locals_models$unet3d$losses$$$class__7_WeightedCrossEntropyLoss_182); - locals_models$unet3d$losses$$$class__7_WeightedCrossEntropyLoss_182 = NULL; - // Re-raise. - exception_type = exception_keeper_type_20; - exception_value = exception_keeper_value_20; - exception_tb = exception_keeper_tb_20; - exception_lineno = exception_keeper_lineno_20; - - goto try_except_handler_21; - // End of try: - NUITKA_CANNOT_GET_HERE("tried codes exits in all cases"); - return NULL; - // Return handler code: - try_return_handler_21:; - CHECK_OBJECT(outline_6_var___class__); - Py_DECREF(outline_6_var___class__); - outline_6_var___class__ = NULL; - goto outline_result_7; - // Exception handler code: - try_except_handler_21:; - exception_keeper_type_21 = exception_type; - exception_keeper_value_21 = exception_value; - exception_keeper_tb_21 = exception_tb; - exception_keeper_lineno_21 = exception_lineno; - exception_type = NULL; - exception_value = NULL; - exception_tb = NULL; - exception_lineno = 0; - - // Re-raise. - exception_type = exception_keeper_type_21; - exception_value = exception_keeper_value_21; - exception_tb = exception_keeper_tb_21; - exception_lineno = exception_keeper_lineno_21; - - goto outline_exception_7; - // End of try: - NUITKA_CANNOT_GET_HERE("Return statement must have exited already."); - return NULL; - outline_exception_7:; - exception_lineno = 182; - goto try_except_handler_20; - outline_result_7:; - UPDATE_STRING_DICT1(moduledict_models$unet3d$losses, (Nuitka_StringObject *)mod_consts[59], tmp_assign_source_68); - } - goto try_end_8; - // Exception handler code: - try_except_handler_20:; - exception_keeper_type_22 = exception_type; - exception_keeper_value_22 = exception_value; - exception_keeper_tb_22 = exception_tb; - exception_keeper_lineno_22 = exception_lineno; - exception_type = NULL; - exception_value = NULL; - exception_tb = NULL; - exception_lineno = 0; - - Py_XDECREF(tmp_class_creation_7__bases_orig); - tmp_class_creation_7__bases_orig = NULL; - Py_XDECREF(tmp_class_creation_7__bases); - tmp_class_creation_7__bases = NULL; - Py_XDECREF(tmp_class_creation_7__class_decl_dict); - tmp_class_creation_7__class_decl_dict = NULL; - Py_XDECREF(tmp_class_creation_7__metaclass); - tmp_class_creation_7__metaclass = NULL; - Py_XDECREF(tmp_class_creation_7__prepared); - tmp_class_creation_7__prepared = NULL; - // Re-raise. - exception_type = exception_keeper_type_22; - exception_value = exception_keeper_value_22; - exception_tb = exception_keeper_tb_22; - exception_lineno = exception_keeper_lineno_22; - - goto frame_exception_exit_1; - // End of try: - try_end_8:; - CHECK_OBJECT(tmp_class_creation_7__bases_orig); - Py_DECREF(tmp_class_creation_7__bases_orig); - tmp_class_creation_7__bases_orig = NULL; - Py_XDECREF(tmp_class_creation_7__bases); - tmp_class_creation_7__bases = NULL; - Py_XDECREF(tmp_class_creation_7__class_decl_dict); - tmp_class_creation_7__class_decl_dict = NULL; - Py_XDECREF(tmp_class_creation_7__metaclass); - tmp_class_creation_7__metaclass = NULL; - CHECK_OBJECT(tmp_class_creation_7__prepared); - Py_DECREF(tmp_class_creation_7__prepared); - tmp_class_creation_7__prepared = NULL; - // Tried code: - { - PyObject *tmp_assign_source_70; - PyObject *tmp_tuple_element_29; - PyObject *tmp_expression_name_41; - tmp_expression_name_41 = GET_STRING_DICT_VALUE(moduledict_models$unet3d$losses, (Nuitka_StringObject *)mod_consts[36]); - - if (unlikely(tmp_expression_name_41 == NULL)) { - tmp_expression_name_41 = GET_MODULE_VARIABLE_VALUE_FALLBACK(mod_consts[36]); - } - - if (tmp_expression_name_41 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 205; - - goto try_except_handler_23; - } - tmp_tuple_element_29 = LOOKUP_ATTRIBUTE(tmp_expression_name_41, mod_consts[138]); - if (tmp_tuple_element_29 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 205; - - goto try_except_handler_23; - } - tmp_assign_source_70 = PyTuple_New(1); - PyTuple_SET_ITEM(tmp_assign_source_70, 0, tmp_tuple_element_29); - assert(tmp_class_creation_8__bases_orig == NULL); - tmp_class_creation_8__bases_orig = tmp_assign_source_70; - } - { - PyObject *tmp_assign_source_71; - PyObject *tmp_dircall_arg1_8; - CHECK_OBJECT(tmp_class_creation_8__bases_orig); - tmp_dircall_arg1_8 = tmp_class_creation_8__bases_orig; - Py_INCREF(tmp_dircall_arg1_8); - - { - PyObject *dir_call_args[] = {tmp_dircall_arg1_8}; - tmp_assign_source_71 = impl_models$$$function__1__mro_entries_conversion(dir_call_args); - } - if (tmp_assign_source_71 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 205; - - goto try_except_handler_23; - } - assert(tmp_class_creation_8__bases == NULL); - tmp_class_creation_8__bases = tmp_assign_source_71; - } - { - PyObject *tmp_assign_source_72; - tmp_assign_source_72 = PyDict_New(); - assert(tmp_class_creation_8__class_decl_dict == NULL); - tmp_class_creation_8__class_decl_dict = tmp_assign_source_72; - } - { - PyObject *tmp_assign_source_73; - PyObject *tmp_metaclass_name_8; - nuitka_bool tmp_condition_result_44; - PyObject *tmp_key_name_22; - PyObject *tmp_dict_arg_name_22; - PyObject *tmp_dict_arg_name_23; - PyObject *tmp_key_name_23; - nuitka_bool tmp_condition_result_45; - int tmp_truth_name_8; - PyObject *tmp_type_arg_15; - PyObject *tmp_expression_name_42; - PyObject *tmp_subscript_name_8; - PyObject *tmp_bases_name_8; - tmp_key_name_22 = mod_consts[139]; - CHECK_OBJECT(tmp_class_creation_8__class_decl_dict); - tmp_dict_arg_name_22 = tmp_class_creation_8__class_decl_dict; - tmp_res = DICT_HAS_ITEM(tmp_dict_arg_name_22, tmp_key_name_22); - assert(!(tmp_res == -1)); - tmp_condition_result_44 = (tmp_res != 0) ? NUITKA_BOOL_TRUE : NUITKA_BOOL_FALSE; - if (tmp_condition_result_44 == NUITKA_BOOL_TRUE) { - goto condexpr_true_16; - } else { - goto condexpr_false_16; - } - condexpr_true_16:; - CHECK_OBJECT(tmp_class_creation_8__class_decl_dict); - tmp_dict_arg_name_23 = tmp_class_creation_8__class_decl_dict; - tmp_key_name_23 = mod_consts[139]; - tmp_metaclass_name_8 = DICT_GET_ITEM_WITH_ERROR(tmp_dict_arg_name_23, tmp_key_name_23); - if (tmp_metaclass_name_8 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 205; - - goto try_except_handler_23; - } - goto condexpr_end_16; - condexpr_false_16:; - CHECK_OBJECT(tmp_class_creation_8__bases); - tmp_truth_name_8 = CHECK_IF_TRUE(tmp_class_creation_8__bases); - if (tmp_truth_name_8 == -1) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 205; - - goto try_except_handler_23; - } - tmp_condition_result_45 = tmp_truth_name_8 == 0 ? NUITKA_BOOL_FALSE : NUITKA_BOOL_TRUE; - if (tmp_condition_result_45 == NUITKA_BOOL_TRUE) { - goto condexpr_true_17; - } else { - goto condexpr_false_17; - } - condexpr_true_17:; - CHECK_OBJECT(tmp_class_creation_8__bases); - tmp_expression_name_42 = tmp_class_creation_8__bases; - tmp_subscript_name_8 = mod_consts[127]; - tmp_type_arg_15 = LOOKUP_SUBSCRIPT_CONST(tmp_expression_name_42, tmp_subscript_name_8, 0); - if (tmp_type_arg_15 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 205; - - goto try_except_handler_23; - } - tmp_metaclass_name_8 = BUILTIN_TYPE1(tmp_type_arg_15); - Py_DECREF(tmp_type_arg_15); - if (tmp_metaclass_name_8 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 205; - - goto try_except_handler_23; - } - goto condexpr_end_17; - condexpr_false_17:; - tmp_metaclass_name_8 = (PyObject *)&PyType_Type; - Py_INCREF(tmp_metaclass_name_8); - condexpr_end_17:; - condexpr_end_16:; - CHECK_OBJECT(tmp_class_creation_8__bases); - tmp_bases_name_8 = tmp_class_creation_8__bases; - tmp_assign_source_73 = SELECT_METACLASS(tmp_metaclass_name_8, tmp_bases_name_8); - Py_DECREF(tmp_metaclass_name_8); - if (tmp_assign_source_73 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 205; - - goto try_except_handler_23; - } - assert(tmp_class_creation_8__metaclass == NULL); - tmp_class_creation_8__metaclass = tmp_assign_source_73; - } - { - nuitka_bool tmp_condition_result_46; - PyObject *tmp_key_name_24; - PyObject *tmp_dict_arg_name_24; - tmp_key_name_24 = mod_consts[139]; - CHECK_OBJECT(tmp_class_creation_8__class_decl_dict); - tmp_dict_arg_name_24 = tmp_class_creation_8__class_decl_dict; - tmp_res = DICT_HAS_ITEM(tmp_dict_arg_name_24, tmp_key_name_24); - assert(!(tmp_res == -1)); - tmp_condition_result_46 = (tmp_res != 0) ? NUITKA_BOOL_TRUE : NUITKA_BOOL_FALSE; - if (tmp_condition_result_46 == NUITKA_BOOL_TRUE) { - goto branch_yes_29; - } else { - goto branch_no_29; - } - } - branch_yes_29:; - CHECK_OBJECT(tmp_class_creation_8__class_decl_dict); - tmp_dictdel_dict = tmp_class_creation_8__class_decl_dict; - tmp_dictdel_key = mod_consts[139]; - tmp_result = DICT_REMOVE_ITEM(tmp_dictdel_dict, tmp_dictdel_key); - if (tmp_result == false) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 205; - - goto try_except_handler_23; - } - branch_no_29:; - { - nuitka_bool tmp_condition_result_47; - PyObject *tmp_expression_name_43; - CHECK_OBJECT(tmp_class_creation_8__metaclass); - tmp_expression_name_43 = tmp_class_creation_8__metaclass; - tmp_result = HAS_ATTR_BOOL(tmp_expression_name_43, mod_consts[140]); - tmp_condition_result_47 = (tmp_result) ? NUITKA_BOOL_TRUE : NUITKA_BOOL_FALSE; - if (tmp_condition_result_47 == NUITKA_BOOL_TRUE) { - goto branch_yes_30; - } else { - goto branch_no_30; - } - } - branch_yes_30:; - { - PyObject *tmp_assign_source_74; - PyObject *tmp_called_name_16; - PyObject *tmp_expression_name_44; - PyObject *tmp_args_name_15; - PyObject *tmp_tuple_element_30; - PyObject *tmp_kwargs_name_15; - CHECK_OBJECT(tmp_class_creation_8__metaclass); - tmp_expression_name_44 = tmp_class_creation_8__metaclass; - tmp_called_name_16 = LOOKUP_ATTRIBUTE(tmp_expression_name_44, mod_consts[140]); - if (tmp_called_name_16 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 205; - - goto try_except_handler_23; - } - tmp_tuple_element_30 = mod_consts[66]; - tmp_args_name_15 = PyTuple_New(2); - PyTuple_SET_ITEM0(tmp_args_name_15, 0, tmp_tuple_element_30); - CHECK_OBJECT(tmp_class_creation_8__bases); - tmp_tuple_element_30 = tmp_class_creation_8__bases; - PyTuple_SET_ITEM0(tmp_args_name_15, 1, tmp_tuple_element_30); - CHECK_OBJECT(tmp_class_creation_8__class_decl_dict); - tmp_kwargs_name_15 = tmp_class_creation_8__class_decl_dict; - frame_705bf4315d2d4f531dff5d3d03b1beec->m_frame.f_lineno = 205; - tmp_assign_source_74 = CALL_FUNCTION(tmp_called_name_16, tmp_args_name_15, tmp_kwargs_name_15); - Py_DECREF(tmp_called_name_16); - Py_DECREF(tmp_args_name_15); - if (tmp_assign_source_74 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 205; - - goto try_except_handler_23; - } - assert(tmp_class_creation_8__prepared == NULL); - tmp_class_creation_8__prepared = tmp_assign_source_74; - } - { - nuitka_bool tmp_condition_result_48; - PyObject *tmp_operand_name_8; - PyObject *tmp_expression_name_45; - CHECK_OBJECT(tmp_class_creation_8__prepared); - tmp_expression_name_45 = tmp_class_creation_8__prepared; - tmp_result = HAS_ATTR_BOOL(tmp_expression_name_45, mod_consts[141]); - tmp_operand_name_8 = (tmp_result) ? Py_True : Py_False; - tmp_res = CHECK_IF_TRUE(tmp_operand_name_8); - if (tmp_res == -1) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 205; - - goto try_except_handler_23; - } - tmp_condition_result_48 = (tmp_res == 0) ? NUITKA_BOOL_TRUE : NUITKA_BOOL_FALSE; - if (tmp_condition_result_48 == NUITKA_BOOL_TRUE) { - goto branch_yes_31; - } else { - goto branch_no_31; - } - } - branch_yes_31:; - { - PyObject *tmp_raise_type_8; - PyObject *tmp_raise_value_8; - PyObject *tmp_left_name_8; - PyObject *tmp_right_name_8; - PyObject *tmp_tuple_element_31; - PyObject *tmp_getattr_target_8; - PyObject *tmp_getattr_attr_8; - PyObject *tmp_getattr_default_8; - tmp_raise_type_8 = PyExc_TypeError; - tmp_left_name_8 = mod_consts[142]; - CHECK_OBJECT(tmp_class_creation_8__metaclass); - tmp_getattr_target_8 = tmp_class_creation_8__metaclass; - tmp_getattr_attr_8 = mod_consts[143]; - tmp_getattr_default_8 = mod_consts[144]; - tmp_tuple_element_31 = BUILTIN_GETATTR(tmp_getattr_target_8, tmp_getattr_attr_8, tmp_getattr_default_8); - if (tmp_tuple_element_31 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 205; - - goto try_except_handler_23; - } - tmp_right_name_8 = PyTuple_New(2); - { - PyObject *tmp_expression_name_46; - PyObject *tmp_type_arg_16; - PyTuple_SET_ITEM(tmp_right_name_8, 0, tmp_tuple_element_31); - CHECK_OBJECT(tmp_class_creation_8__prepared); - tmp_type_arg_16 = tmp_class_creation_8__prepared; - tmp_expression_name_46 = BUILTIN_TYPE1(tmp_type_arg_16); - assert(!(tmp_expression_name_46 == NULL)); - tmp_tuple_element_31 = LOOKUP_ATTRIBUTE(tmp_expression_name_46, mod_consts[143]); - Py_DECREF(tmp_expression_name_46); - if (tmp_tuple_element_31 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 205; - - goto tuple_build_exception_8; - } - PyTuple_SET_ITEM(tmp_right_name_8, 1, tmp_tuple_element_31); - } - goto tuple_build_noexception_8; - // Exception handling pass through code for tuple_build: - tuple_build_exception_8:; - Py_DECREF(tmp_right_name_8); - goto try_except_handler_23; - // Finished with no exception for tuple_build: - tuple_build_noexception_8:; - tmp_raise_value_8 = BINARY_OPERATION_MOD_OBJECT_UNICODE_TUPLE(tmp_left_name_8, tmp_right_name_8); - Py_DECREF(tmp_right_name_8); - if (tmp_raise_value_8 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 205; - - goto try_except_handler_23; - } - exception_type = tmp_raise_type_8; - Py_INCREF(tmp_raise_type_8); - exception_value = tmp_raise_value_8; - exception_lineno = 205; - RAISE_EXCEPTION_IMPLICIT(&exception_type, &exception_value, &exception_tb); - - goto try_except_handler_23; - } - branch_no_31:; - goto branch_end_30; - branch_no_30:; - { - PyObject *tmp_assign_source_75; - tmp_assign_source_75 = PyDict_New(); - assert(tmp_class_creation_8__prepared == NULL); - tmp_class_creation_8__prepared = tmp_assign_source_75; - } - branch_end_30:; - { - PyObject *tmp_assign_source_76; - { - PyObject *tmp_set_locals_8; - CHECK_OBJECT(tmp_class_creation_8__prepared); - tmp_set_locals_8 = tmp_class_creation_8__prepared; - locals_models$unet3d$losses$$$class__8_PixelWiseCrossEntropyLoss_205 = tmp_set_locals_8; - Py_INCREF(tmp_set_locals_8); - } - // Tried code: - // Tried code: - tmp_dictset_value = GET_STRING_DICT_VALUE(moduledict_models$unet3d$losses, (Nuitka_StringObject *)mod_consts[143]); - - if (unlikely(tmp_dictset_value == NULL)) { - tmp_dictset_value = GET_MODULE_VARIABLE_VALUE_FALLBACK(mod_consts[143]); - } - - assert(!(tmp_dictset_value == NULL)); - tmp_res = PyObject_SetItem(locals_models$unet3d$losses$$$class__8_PixelWiseCrossEntropyLoss_205, mod_consts[145], tmp_dictset_value); - if (tmp_res != 0) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 205; - - goto try_except_handler_25; - } - tmp_dictset_value = mod_consts[66]; - tmp_res = PyObject_SetItem(locals_models$unet3d$losses$$$class__8_PixelWiseCrossEntropyLoss_205, mod_consts[147], tmp_dictset_value); - if (tmp_res != 0) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 205; - - goto try_except_handler_25; - } - if (isFrameUnusable(cache_frame_829d0a1ffa540ba75404cd988b32f0b5_9)) { - Py_XDECREF(cache_frame_829d0a1ffa540ba75404cd988b32f0b5_9); - -#if _DEBUG_REFCOUNTS - if (cache_frame_829d0a1ffa540ba75404cd988b32f0b5_9 == NULL) { - count_active_frame_cache_instances += 1; - } else { - count_released_frame_cache_instances += 1; - } - count_allocated_frame_cache_instances += 1; -#endif - cache_frame_829d0a1ffa540ba75404cd988b32f0b5_9 = MAKE_FUNCTION_FRAME(codeobj_829d0a1ffa540ba75404cd988b32f0b5, module_models$unet3d$losses, sizeof(void *)); -#if _DEBUG_REFCOUNTS - } else { - count_hit_frame_cache_instances += 1; -#endif - } - assert(cache_frame_829d0a1ffa540ba75404cd988b32f0b5_9->m_type_description == NULL); - frame_829d0a1ffa540ba75404cd988b32f0b5_9 = cache_frame_829d0a1ffa540ba75404cd988b32f0b5_9; - - // Push the new frame as the currently active one. - pushFrameStack(frame_829d0a1ffa540ba75404cd988b32f0b5_9); - - // Mark the frame object as in use, ref count 1 will be up for reuse. - assert(Py_REFCNT(frame_829d0a1ffa540ba75404cd988b32f0b5_9) == 2); // Frame stack - - // Framed code: - { - PyObject *tmp_defaults_7; - tmp_defaults_7 = mod_consts[175]; - Py_INCREF(tmp_defaults_7); - - - tmp_dictset_value = MAKE_FUNCTION_models$unet3d$losses$$$function__18___init__(tmp_defaults_7); - - tmp_res = PyObject_SetItem(locals_models$unet3d$losses$$$class__8_PixelWiseCrossEntropyLoss_205, mod_consts[13], tmp_dictset_value); - Py_DECREF(tmp_dictset_value); - if (tmp_res != 0) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 206; - type_description_2 = "o"; - goto frame_exception_exit_9; - } - } - - - tmp_dictset_value = MAKE_FUNCTION_models$unet3d$losses$$$function__19_forward(); - - tmp_res = PyObject_SetItem(locals_models$unet3d$losses$$$class__8_PixelWiseCrossEntropyLoss_205, mod_consts[82], tmp_dictset_value); - Py_DECREF(tmp_dictset_value); - if (tmp_res != 0) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 212; - type_description_2 = "o"; - goto frame_exception_exit_9; - } - -#if 0 - RESTORE_FRAME_EXCEPTION(frame_829d0a1ffa540ba75404cd988b32f0b5_9); -#endif - - // Put the previous frame back on top. - popFrameStack(); - - goto frame_no_exception_8; - - frame_exception_exit_9:; - -#if 0 - RESTORE_FRAME_EXCEPTION(frame_829d0a1ffa540ba75404cd988b32f0b5_9); -#endif - - if (exception_tb == NULL) { - exception_tb = MAKE_TRACEBACK(frame_829d0a1ffa540ba75404cd988b32f0b5_9, exception_lineno); - } else if (exception_tb->tb_frame != &frame_829d0a1ffa540ba75404cd988b32f0b5_9->m_frame) { - exception_tb = ADD_TRACEBACK(exception_tb, frame_829d0a1ffa540ba75404cd988b32f0b5_9, exception_lineno); - } - - // Attaches locals to frame if any. - Nuitka_Frame_AttachLocals( - frame_829d0a1ffa540ba75404cd988b32f0b5_9, - type_description_2, - outline_7_var___class__ - ); - - - // Release cached frame if used for exception. - if (frame_829d0a1ffa540ba75404cd988b32f0b5_9 == cache_frame_829d0a1ffa540ba75404cd988b32f0b5_9) { -#if _DEBUG_REFCOUNTS - count_active_frame_cache_instances -= 1; - count_released_frame_cache_instances += 1; -#endif - - Py_DECREF(cache_frame_829d0a1ffa540ba75404cd988b32f0b5_9); - cache_frame_829d0a1ffa540ba75404cd988b32f0b5_9 = NULL; - } - - assertFrameObject(frame_829d0a1ffa540ba75404cd988b32f0b5_9); - - // Put the previous frame back on top. - popFrameStack(); - - // Return the error. - goto nested_frame_exit_8; - - frame_no_exception_8:; - goto skip_nested_handling_8; - nested_frame_exit_8:; - - goto try_except_handler_25; - skip_nested_handling_8:; - { - nuitka_bool tmp_condition_result_49; - PyObject *tmp_compexpr_left_8; - PyObject *tmp_compexpr_right_8; - CHECK_OBJECT(tmp_class_creation_8__bases); - tmp_compexpr_left_8 = tmp_class_creation_8__bases; - CHECK_OBJECT(tmp_class_creation_8__bases_orig); - tmp_compexpr_right_8 = tmp_class_creation_8__bases_orig; - tmp_condition_result_49 = RICH_COMPARE_NE_NBOOL_OBJECT_TUPLE(tmp_compexpr_left_8, tmp_compexpr_right_8); - if (tmp_condition_result_49 == NUITKA_BOOL_EXCEPTION) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 205; - - goto try_except_handler_25; - } - if (tmp_condition_result_49 == NUITKA_BOOL_TRUE) { - goto branch_yes_32; - } else { - goto branch_no_32; - } - assert(tmp_condition_result_49 != NUITKA_BOOL_UNASSIGNED); - } - branch_yes_32:; - CHECK_OBJECT(tmp_class_creation_8__bases_orig); - tmp_dictset_value = tmp_class_creation_8__bases_orig; - tmp_res = PyObject_SetItem(locals_models$unet3d$losses$$$class__8_PixelWiseCrossEntropyLoss_205, mod_consts[150], tmp_dictset_value); - if (tmp_res != 0) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 205; - - goto try_except_handler_25; - } - branch_no_32:; - { - PyObject *tmp_assign_source_77; - PyObject *tmp_called_name_17; - PyObject *tmp_args_name_16; - PyObject *tmp_tuple_element_32; - PyObject *tmp_kwargs_name_16; - CHECK_OBJECT(tmp_class_creation_8__metaclass); - tmp_called_name_17 = tmp_class_creation_8__metaclass; - tmp_tuple_element_32 = mod_consts[66]; - tmp_args_name_16 = PyTuple_New(3); - PyTuple_SET_ITEM0(tmp_args_name_16, 0, tmp_tuple_element_32); - CHECK_OBJECT(tmp_class_creation_8__bases); - tmp_tuple_element_32 = tmp_class_creation_8__bases; - PyTuple_SET_ITEM0(tmp_args_name_16, 1, tmp_tuple_element_32); - tmp_tuple_element_32 = locals_models$unet3d$losses$$$class__8_PixelWiseCrossEntropyLoss_205; - PyTuple_SET_ITEM0(tmp_args_name_16, 2, tmp_tuple_element_32); - CHECK_OBJECT(tmp_class_creation_8__class_decl_dict); - tmp_kwargs_name_16 = tmp_class_creation_8__class_decl_dict; - frame_705bf4315d2d4f531dff5d3d03b1beec->m_frame.f_lineno = 205; - tmp_assign_source_77 = CALL_FUNCTION(tmp_called_name_17, tmp_args_name_16, tmp_kwargs_name_16); - Py_DECREF(tmp_args_name_16); - if (tmp_assign_source_77 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 205; - - goto try_except_handler_25; - } - assert(outline_7_var___class__ == NULL); - outline_7_var___class__ = tmp_assign_source_77; - } - CHECK_OBJECT(outline_7_var___class__); - tmp_assign_source_76 = outline_7_var___class__; - Py_INCREF(tmp_assign_source_76); - goto try_return_handler_25; - NUITKA_CANNOT_GET_HERE("tried codes exits in all cases"); - return NULL; - // Return handler code: - try_return_handler_25:; - Py_DECREF(locals_models$unet3d$losses$$$class__8_PixelWiseCrossEntropyLoss_205); - locals_models$unet3d$losses$$$class__8_PixelWiseCrossEntropyLoss_205 = NULL; - goto try_return_handler_24; - // Exception handler code: - try_except_handler_25:; - exception_keeper_type_23 = exception_type; - exception_keeper_value_23 = exception_value; - exception_keeper_tb_23 = exception_tb; - exception_keeper_lineno_23 = exception_lineno; - exception_type = NULL; - exception_value = NULL; - exception_tb = NULL; - exception_lineno = 0; - - Py_DECREF(locals_models$unet3d$losses$$$class__8_PixelWiseCrossEntropyLoss_205); - locals_models$unet3d$losses$$$class__8_PixelWiseCrossEntropyLoss_205 = NULL; - // Re-raise. - exception_type = exception_keeper_type_23; - exception_value = exception_keeper_value_23; - exception_tb = exception_keeper_tb_23; - exception_lineno = exception_keeper_lineno_23; - - goto try_except_handler_24; - // End of try: - NUITKA_CANNOT_GET_HERE("tried codes exits in all cases"); - return NULL; - // Return handler code: - try_return_handler_24:; - CHECK_OBJECT(outline_7_var___class__); - Py_DECREF(outline_7_var___class__); - outline_7_var___class__ = NULL; - goto outline_result_8; - // Exception handler code: - try_except_handler_24:; - exception_keeper_type_24 = exception_type; - exception_keeper_value_24 = exception_value; - exception_keeper_tb_24 = exception_tb; - exception_keeper_lineno_24 = exception_lineno; - exception_type = NULL; - exception_value = NULL; - exception_tb = NULL; - exception_lineno = 0; - - // Re-raise. - exception_type = exception_keeper_type_24; - exception_value = exception_keeper_value_24; - exception_tb = exception_keeper_tb_24; - exception_lineno = exception_keeper_lineno_24; - - goto outline_exception_8; - // End of try: - NUITKA_CANNOT_GET_HERE("Return statement must have exited already."); - return NULL; - outline_exception_8:; - exception_lineno = 205; - goto try_except_handler_23; - outline_result_8:; - UPDATE_STRING_DICT1(moduledict_models$unet3d$losses, (Nuitka_StringObject *)mod_consts[66], tmp_assign_source_76); - } - goto try_end_9; - // Exception handler code: - try_except_handler_23:; - exception_keeper_type_25 = exception_type; - exception_keeper_value_25 = exception_value; - exception_keeper_tb_25 = exception_tb; - exception_keeper_lineno_25 = exception_lineno; - exception_type = NULL; - exception_value = NULL; - exception_tb = NULL; - exception_lineno = 0; - - Py_XDECREF(tmp_class_creation_8__bases_orig); - tmp_class_creation_8__bases_orig = NULL; - Py_XDECREF(tmp_class_creation_8__bases); - tmp_class_creation_8__bases = NULL; - Py_XDECREF(tmp_class_creation_8__class_decl_dict); - tmp_class_creation_8__class_decl_dict = NULL; - Py_XDECREF(tmp_class_creation_8__metaclass); - tmp_class_creation_8__metaclass = NULL; - Py_XDECREF(tmp_class_creation_8__prepared); - tmp_class_creation_8__prepared = NULL; - // Re-raise. - exception_type = exception_keeper_type_25; - exception_value = exception_keeper_value_25; - exception_tb = exception_keeper_tb_25; - exception_lineno = exception_keeper_lineno_25; - - goto frame_exception_exit_1; - // End of try: - try_end_9:; - CHECK_OBJECT(tmp_class_creation_8__bases_orig); - Py_DECREF(tmp_class_creation_8__bases_orig); - tmp_class_creation_8__bases_orig = NULL; - Py_XDECREF(tmp_class_creation_8__bases); - tmp_class_creation_8__bases = NULL; - Py_XDECREF(tmp_class_creation_8__class_decl_dict); - tmp_class_creation_8__class_decl_dict = NULL; - Py_XDECREF(tmp_class_creation_8__metaclass); - tmp_class_creation_8__metaclass = NULL; - CHECK_OBJECT(tmp_class_creation_8__prepared); - Py_DECREF(tmp_class_creation_8__prepared); - tmp_class_creation_8__prepared = NULL; - // Tried code: - { - PyObject *tmp_assign_source_78; - PyObject *tmp_tuple_element_33; - PyObject *tmp_expression_name_47; - tmp_expression_name_47 = GET_STRING_DICT_VALUE(moduledict_models$unet3d$losses, (Nuitka_StringObject *)mod_consts[36]); - - if (unlikely(tmp_expression_name_47 == NULL)) { - tmp_expression_name_47 = GET_MODULE_VARIABLE_VALUE_FALLBACK(mod_consts[36]); - } - - if (tmp_expression_name_47 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 240; - - goto try_except_handler_26; - } - tmp_tuple_element_33 = LOOKUP_ATTRIBUTE(tmp_expression_name_47, mod_consts[113]); - if (tmp_tuple_element_33 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 240; - - goto try_except_handler_26; - } - tmp_assign_source_78 = PyTuple_New(1); - PyTuple_SET_ITEM(tmp_assign_source_78, 0, tmp_tuple_element_33); - assert(tmp_class_creation_9__bases_orig == NULL); - tmp_class_creation_9__bases_orig = tmp_assign_source_78; - } - { - PyObject *tmp_assign_source_79; - PyObject *tmp_dircall_arg1_9; - CHECK_OBJECT(tmp_class_creation_9__bases_orig); - tmp_dircall_arg1_9 = tmp_class_creation_9__bases_orig; - Py_INCREF(tmp_dircall_arg1_9); - - { - PyObject *dir_call_args[] = {tmp_dircall_arg1_9}; - tmp_assign_source_79 = impl_models$$$function__1__mro_entries_conversion(dir_call_args); - } - if (tmp_assign_source_79 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 240; - - goto try_except_handler_26; - } - assert(tmp_class_creation_9__bases == NULL); - tmp_class_creation_9__bases = tmp_assign_source_79; - } - { - PyObject *tmp_assign_source_80; - tmp_assign_source_80 = PyDict_New(); - assert(tmp_class_creation_9__class_decl_dict == NULL); - tmp_class_creation_9__class_decl_dict = tmp_assign_source_80; - } - { - PyObject *tmp_assign_source_81; - PyObject *tmp_metaclass_name_9; - nuitka_bool tmp_condition_result_50; - PyObject *tmp_key_name_25; - PyObject *tmp_dict_arg_name_25; - PyObject *tmp_dict_arg_name_26; - PyObject *tmp_key_name_26; - nuitka_bool tmp_condition_result_51; - int tmp_truth_name_9; - PyObject *tmp_type_arg_17; - PyObject *tmp_expression_name_48; - PyObject *tmp_subscript_name_9; - PyObject *tmp_bases_name_9; - tmp_key_name_25 = mod_consts[139]; - CHECK_OBJECT(tmp_class_creation_9__class_decl_dict); - tmp_dict_arg_name_25 = tmp_class_creation_9__class_decl_dict; - tmp_res = DICT_HAS_ITEM(tmp_dict_arg_name_25, tmp_key_name_25); - assert(!(tmp_res == -1)); - tmp_condition_result_50 = (tmp_res != 0) ? NUITKA_BOOL_TRUE : NUITKA_BOOL_FALSE; - if (tmp_condition_result_50 == NUITKA_BOOL_TRUE) { - goto condexpr_true_18; - } else { - goto condexpr_false_18; - } - condexpr_true_18:; - CHECK_OBJECT(tmp_class_creation_9__class_decl_dict); - tmp_dict_arg_name_26 = tmp_class_creation_9__class_decl_dict; - tmp_key_name_26 = mod_consts[139]; - tmp_metaclass_name_9 = DICT_GET_ITEM_WITH_ERROR(tmp_dict_arg_name_26, tmp_key_name_26); - if (tmp_metaclass_name_9 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 240; - - goto try_except_handler_26; - } - goto condexpr_end_18; - condexpr_false_18:; - CHECK_OBJECT(tmp_class_creation_9__bases); - tmp_truth_name_9 = CHECK_IF_TRUE(tmp_class_creation_9__bases); - if (tmp_truth_name_9 == -1) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 240; - - goto try_except_handler_26; - } - tmp_condition_result_51 = tmp_truth_name_9 == 0 ? NUITKA_BOOL_FALSE : NUITKA_BOOL_TRUE; - if (tmp_condition_result_51 == NUITKA_BOOL_TRUE) { - goto condexpr_true_19; - } else { - goto condexpr_false_19; - } - condexpr_true_19:; - CHECK_OBJECT(tmp_class_creation_9__bases); - tmp_expression_name_48 = tmp_class_creation_9__bases; - tmp_subscript_name_9 = mod_consts[127]; - tmp_type_arg_17 = LOOKUP_SUBSCRIPT_CONST(tmp_expression_name_48, tmp_subscript_name_9, 0); - if (tmp_type_arg_17 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 240; - - goto try_except_handler_26; - } - tmp_metaclass_name_9 = BUILTIN_TYPE1(tmp_type_arg_17); - Py_DECREF(tmp_type_arg_17); - if (tmp_metaclass_name_9 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 240; - - goto try_except_handler_26; - } - goto condexpr_end_19; - condexpr_false_19:; - tmp_metaclass_name_9 = (PyObject *)&PyType_Type; - Py_INCREF(tmp_metaclass_name_9); - condexpr_end_19:; - condexpr_end_18:; - CHECK_OBJECT(tmp_class_creation_9__bases); - tmp_bases_name_9 = tmp_class_creation_9__bases; - tmp_assign_source_81 = SELECT_METACLASS(tmp_metaclass_name_9, tmp_bases_name_9); - Py_DECREF(tmp_metaclass_name_9); - if (tmp_assign_source_81 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 240; - - goto try_except_handler_26; - } - assert(tmp_class_creation_9__metaclass == NULL); - tmp_class_creation_9__metaclass = tmp_assign_source_81; - } - { - nuitka_bool tmp_condition_result_52; - PyObject *tmp_key_name_27; - PyObject *tmp_dict_arg_name_27; - tmp_key_name_27 = mod_consts[139]; - CHECK_OBJECT(tmp_class_creation_9__class_decl_dict); - tmp_dict_arg_name_27 = tmp_class_creation_9__class_decl_dict; - tmp_res = DICT_HAS_ITEM(tmp_dict_arg_name_27, tmp_key_name_27); - assert(!(tmp_res == -1)); - tmp_condition_result_52 = (tmp_res != 0) ? NUITKA_BOOL_TRUE : NUITKA_BOOL_FALSE; - if (tmp_condition_result_52 == NUITKA_BOOL_TRUE) { - goto branch_yes_33; - } else { - goto branch_no_33; - } - } - branch_yes_33:; - CHECK_OBJECT(tmp_class_creation_9__class_decl_dict); - tmp_dictdel_dict = tmp_class_creation_9__class_decl_dict; - tmp_dictdel_key = mod_consts[139]; - tmp_result = DICT_REMOVE_ITEM(tmp_dictdel_dict, tmp_dictdel_key); - if (tmp_result == false) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 240; - - goto try_except_handler_26; - } - branch_no_33:; - { - nuitka_bool tmp_condition_result_53; - PyObject *tmp_expression_name_49; - CHECK_OBJECT(tmp_class_creation_9__metaclass); - tmp_expression_name_49 = tmp_class_creation_9__metaclass; - tmp_result = HAS_ATTR_BOOL(tmp_expression_name_49, mod_consts[140]); - tmp_condition_result_53 = (tmp_result) ? NUITKA_BOOL_TRUE : NUITKA_BOOL_FALSE; - if (tmp_condition_result_53 == NUITKA_BOOL_TRUE) { - goto branch_yes_34; - } else { - goto branch_no_34; - } - } - branch_yes_34:; - { - PyObject *tmp_assign_source_82; - PyObject *tmp_called_name_18; - PyObject *tmp_expression_name_50; - PyObject *tmp_args_name_17; - PyObject *tmp_tuple_element_34; - PyObject *tmp_kwargs_name_17; - CHECK_OBJECT(tmp_class_creation_9__metaclass); - tmp_expression_name_50 = tmp_class_creation_9__metaclass; - tmp_called_name_18 = LOOKUP_ATTRIBUTE(tmp_expression_name_50, mod_consts[140]); - if (tmp_called_name_18 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 240; - - goto try_except_handler_26; - } - tmp_tuple_element_34 = mod_consts[115]; - tmp_args_name_17 = PyTuple_New(2); - PyTuple_SET_ITEM0(tmp_args_name_17, 0, tmp_tuple_element_34); - CHECK_OBJECT(tmp_class_creation_9__bases); - tmp_tuple_element_34 = tmp_class_creation_9__bases; - PyTuple_SET_ITEM0(tmp_args_name_17, 1, tmp_tuple_element_34); - CHECK_OBJECT(tmp_class_creation_9__class_decl_dict); - tmp_kwargs_name_17 = tmp_class_creation_9__class_decl_dict; - frame_705bf4315d2d4f531dff5d3d03b1beec->m_frame.f_lineno = 240; - tmp_assign_source_82 = CALL_FUNCTION(tmp_called_name_18, tmp_args_name_17, tmp_kwargs_name_17); - Py_DECREF(tmp_called_name_18); - Py_DECREF(tmp_args_name_17); - if (tmp_assign_source_82 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 240; - - goto try_except_handler_26; - } - assert(tmp_class_creation_9__prepared == NULL); - tmp_class_creation_9__prepared = tmp_assign_source_82; - } - { - nuitka_bool tmp_condition_result_54; - PyObject *tmp_operand_name_9; - PyObject *tmp_expression_name_51; - CHECK_OBJECT(tmp_class_creation_9__prepared); - tmp_expression_name_51 = tmp_class_creation_9__prepared; - tmp_result = HAS_ATTR_BOOL(tmp_expression_name_51, mod_consts[141]); - tmp_operand_name_9 = (tmp_result) ? Py_True : Py_False; - tmp_res = CHECK_IF_TRUE(tmp_operand_name_9); - if (tmp_res == -1) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 240; - - goto try_except_handler_26; - } - tmp_condition_result_54 = (tmp_res == 0) ? NUITKA_BOOL_TRUE : NUITKA_BOOL_FALSE; - if (tmp_condition_result_54 == NUITKA_BOOL_TRUE) { - goto branch_yes_35; - } else { - goto branch_no_35; - } - } - branch_yes_35:; - { - PyObject *tmp_raise_type_9; - PyObject *tmp_raise_value_9; - PyObject *tmp_left_name_9; - PyObject *tmp_right_name_9; - PyObject *tmp_tuple_element_35; - PyObject *tmp_getattr_target_9; - PyObject *tmp_getattr_attr_9; - PyObject *tmp_getattr_default_9; - tmp_raise_type_9 = PyExc_TypeError; - tmp_left_name_9 = mod_consts[142]; - CHECK_OBJECT(tmp_class_creation_9__metaclass); - tmp_getattr_target_9 = tmp_class_creation_9__metaclass; - tmp_getattr_attr_9 = mod_consts[143]; - tmp_getattr_default_9 = mod_consts[144]; - tmp_tuple_element_35 = BUILTIN_GETATTR(tmp_getattr_target_9, tmp_getattr_attr_9, tmp_getattr_default_9); - if (tmp_tuple_element_35 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 240; - - goto try_except_handler_26; - } - tmp_right_name_9 = PyTuple_New(2); - { - PyObject *tmp_expression_name_52; - PyObject *tmp_type_arg_18; - PyTuple_SET_ITEM(tmp_right_name_9, 0, tmp_tuple_element_35); - CHECK_OBJECT(tmp_class_creation_9__prepared); - tmp_type_arg_18 = tmp_class_creation_9__prepared; - tmp_expression_name_52 = BUILTIN_TYPE1(tmp_type_arg_18); - assert(!(tmp_expression_name_52 == NULL)); - tmp_tuple_element_35 = LOOKUP_ATTRIBUTE(tmp_expression_name_52, mod_consts[143]); - Py_DECREF(tmp_expression_name_52); - if (tmp_tuple_element_35 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 240; - - goto tuple_build_exception_9; - } - PyTuple_SET_ITEM(tmp_right_name_9, 1, tmp_tuple_element_35); - } - goto tuple_build_noexception_9; - // Exception handling pass through code for tuple_build: - tuple_build_exception_9:; - Py_DECREF(tmp_right_name_9); - goto try_except_handler_26; - // Finished with no exception for tuple_build: - tuple_build_noexception_9:; - tmp_raise_value_9 = BINARY_OPERATION_MOD_OBJECT_UNICODE_TUPLE(tmp_left_name_9, tmp_right_name_9); - Py_DECREF(tmp_right_name_9); - if (tmp_raise_value_9 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 240; - - goto try_except_handler_26; - } - exception_type = tmp_raise_type_9; - Py_INCREF(tmp_raise_type_9); - exception_value = tmp_raise_value_9; - exception_lineno = 240; - RAISE_EXCEPTION_IMPLICIT(&exception_type, &exception_value, &exception_tb); - - goto try_except_handler_26; - } - branch_no_35:; - goto branch_end_34; - branch_no_34:; - { - PyObject *tmp_assign_source_83; - tmp_assign_source_83 = PyDict_New(); - assert(tmp_class_creation_9__prepared == NULL); - tmp_class_creation_9__prepared = tmp_assign_source_83; - } - branch_end_34:; - { - PyObject *tmp_assign_source_84; - { - PyObject *tmp_set_locals_9; - CHECK_OBJECT(tmp_class_creation_9__prepared); - tmp_set_locals_9 = tmp_class_creation_9__prepared; - locals_models$unet3d$losses$$$class__9_WeightedSmoothL1Loss_240 = tmp_set_locals_9; - Py_INCREF(tmp_set_locals_9); - } - // Tried code: - // Tried code: - tmp_dictset_value = GET_STRING_DICT_VALUE(moduledict_models$unet3d$losses, (Nuitka_StringObject *)mod_consts[143]); - - if (unlikely(tmp_dictset_value == NULL)) { - tmp_dictset_value = GET_MODULE_VARIABLE_VALUE_FALLBACK(mod_consts[143]); - } - - assert(!(tmp_dictset_value == NULL)); - tmp_res = PyObject_SetItem(locals_models$unet3d$losses$$$class__9_WeightedSmoothL1Loss_240, mod_consts[145], tmp_dictset_value); - if (tmp_res != 0) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 240; - - goto try_except_handler_28; - } - tmp_dictset_value = mod_consts[115]; - tmp_res = PyObject_SetItem(locals_models$unet3d$losses$$$class__9_WeightedSmoothL1Loss_240, mod_consts[147], tmp_dictset_value); - if (tmp_res != 0) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 240; - - goto try_except_handler_28; - } - if (isFrameUnusable(cache_frame_0812d28c0fd416b215956f202c82484e_10)) { - Py_XDECREF(cache_frame_0812d28c0fd416b215956f202c82484e_10); - -#if _DEBUG_REFCOUNTS - if (cache_frame_0812d28c0fd416b215956f202c82484e_10 == NULL) { - count_active_frame_cache_instances += 1; - } else { - count_released_frame_cache_instances += 1; - } - count_allocated_frame_cache_instances += 1; -#endif - cache_frame_0812d28c0fd416b215956f202c82484e_10 = MAKE_FUNCTION_FRAME(codeobj_0812d28c0fd416b215956f202c82484e, module_models$unet3d$losses, sizeof(void *)); -#if _DEBUG_REFCOUNTS - } else { - count_hit_frame_cache_instances += 1; -#endif - } - assert(cache_frame_0812d28c0fd416b215956f202c82484e_10->m_type_description == NULL); - frame_0812d28c0fd416b215956f202c82484e_10 = cache_frame_0812d28c0fd416b215956f202c82484e_10; - - // Push the new frame as the currently active one. - pushFrameStack(frame_0812d28c0fd416b215956f202c82484e_10); - - // Mark the frame object as in use, ref count 1 will be up for reuse. - assert(Py_REFCNT(frame_0812d28c0fd416b215956f202c82484e_10) == 2); // Frame stack - - // Framed code: - { - PyObject *tmp_defaults_8; - struct Nuitka_CellObject *tmp_closure_3[1]; - tmp_defaults_8 = mod_consts[178]; - Py_INCREF(tmp_defaults_8); - - tmp_closure_3[0] = outline_8_var___class__; - Py_INCREF(tmp_closure_3[0]); - - tmp_dictset_value = MAKE_FUNCTION_models$unet3d$losses$$$function__20___init__(tmp_defaults_8, tmp_closure_3); - - tmp_res = PyObject_SetItem(locals_models$unet3d$losses$$$class__9_WeightedSmoothL1Loss_240, mod_consts[13], tmp_dictset_value); - Py_DECREF(tmp_dictset_value); - if (tmp_res != 0) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 241; - type_description_2 = "c"; - goto frame_exception_exit_10; - } - } - { - struct Nuitka_CellObject *tmp_closure_4[1]; - - tmp_closure_4[0] = outline_8_var___class__; - Py_INCREF(tmp_closure_4[0]); - - tmp_dictset_value = MAKE_FUNCTION_models$unet3d$losses$$$function__21_forward(tmp_closure_4); - - tmp_res = PyObject_SetItem(locals_models$unet3d$losses$$$class__9_WeightedSmoothL1Loss_240, mod_consts[82], tmp_dictset_value); - Py_DECREF(tmp_dictset_value); - if (tmp_res != 0) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 247; - type_description_2 = "c"; - goto frame_exception_exit_10; - } - } - -#if 0 - RESTORE_FRAME_EXCEPTION(frame_0812d28c0fd416b215956f202c82484e_10); -#endif - - // Put the previous frame back on top. - popFrameStack(); - - goto frame_no_exception_9; - - frame_exception_exit_10:; - -#if 0 - RESTORE_FRAME_EXCEPTION(frame_0812d28c0fd416b215956f202c82484e_10); -#endif - - if (exception_tb == NULL) { - exception_tb = MAKE_TRACEBACK(frame_0812d28c0fd416b215956f202c82484e_10, exception_lineno); - } else if (exception_tb->tb_frame != &frame_0812d28c0fd416b215956f202c82484e_10->m_frame) { - exception_tb = ADD_TRACEBACK(exception_tb, frame_0812d28c0fd416b215956f202c82484e_10, exception_lineno); - } - - // Attaches locals to frame if any. - Nuitka_Frame_AttachLocals( - frame_0812d28c0fd416b215956f202c82484e_10, - type_description_2, - outline_8_var___class__ - ); - - - // Release cached frame if used for exception. - if (frame_0812d28c0fd416b215956f202c82484e_10 == cache_frame_0812d28c0fd416b215956f202c82484e_10) { -#if _DEBUG_REFCOUNTS - count_active_frame_cache_instances -= 1; - count_released_frame_cache_instances += 1; -#endif - - Py_DECREF(cache_frame_0812d28c0fd416b215956f202c82484e_10); - cache_frame_0812d28c0fd416b215956f202c82484e_10 = NULL; - } - - assertFrameObject(frame_0812d28c0fd416b215956f202c82484e_10); - - // Put the previous frame back on top. - popFrameStack(); - - // Return the error. - goto nested_frame_exit_9; - - frame_no_exception_9:; - goto skip_nested_handling_9; - nested_frame_exit_9:; - - goto try_except_handler_28; - skip_nested_handling_9:; - { - nuitka_bool tmp_condition_result_55; - PyObject *tmp_compexpr_left_9; - PyObject *tmp_compexpr_right_9; - CHECK_OBJECT(tmp_class_creation_9__bases); - tmp_compexpr_left_9 = tmp_class_creation_9__bases; - CHECK_OBJECT(tmp_class_creation_9__bases_orig); - tmp_compexpr_right_9 = tmp_class_creation_9__bases_orig; - tmp_condition_result_55 = RICH_COMPARE_NE_NBOOL_OBJECT_TUPLE(tmp_compexpr_left_9, tmp_compexpr_right_9); - if (tmp_condition_result_55 == NUITKA_BOOL_EXCEPTION) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 240; - - goto try_except_handler_28; - } - if (tmp_condition_result_55 == NUITKA_BOOL_TRUE) { - goto branch_yes_36; - } else { - goto branch_no_36; - } - assert(tmp_condition_result_55 != NUITKA_BOOL_UNASSIGNED); - } - branch_yes_36:; - CHECK_OBJECT(tmp_class_creation_9__bases_orig); - tmp_dictset_value = tmp_class_creation_9__bases_orig; - tmp_res = PyObject_SetItem(locals_models$unet3d$losses$$$class__9_WeightedSmoothL1Loss_240, mod_consts[150], tmp_dictset_value); - if (tmp_res != 0) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 240; - - goto try_except_handler_28; - } - branch_no_36:; - { - PyObject *tmp_assign_source_85; - PyObject *tmp_called_name_19; - PyObject *tmp_args_name_18; - PyObject *tmp_tuple_element_36; - PyObject *tmp_kwargs_name_18; - CHECK_OBJECT(tmp_class_creation_9__metaclass); - tmp_called_name_19 = tmp_class_creation_9__metaclass; - tmp_tuple_element_36 = mod_consts[115]; - tmp_args_name_18 = PyTuple_New(3); - PyTuple_SET_ITEM0(tmp_args_name_18, 0, tmp_tuple_element_36); - CHECK_OBJECT(tmp_class_creation_9__bases); - tmp_tuple_element_36 = tmp_class_creation_9__bases; - PyTuple_SET_ITEM0(tmp_args_name_18, 1, tmp_tuple_element_36); - tmp_tuple_element_36 = locals_models$unet3d$losses$$$class__9_WeightedSmoothL1Loss_240; - PyTuple_SET_ITEM0(tmp_args_name_18, 2, tmp_tuple_element_36); - CHECK_OBJECT(tmp_class_creation_9__class_decl_dict); - tmp_kwargs_name_18 = tmp_class_creation_9__class_decl_dict; - frame_705bf4315d2d4f531dff5d3d03b1beec->m_frame.f_lineno = 240; - tmp_assign_source_85 = CALL_FUNCTION(tmp_called_name_19, tmp_args_name_18, tmp_kwargs_name_18); - Py_DECREF(tmp_args_name_18); - if (tmp_assign_source_85 == NULL) { - assert(ERROR_OCCURRED()); - - FETCH_ERROR_OCCURRED(&exception_type, &exception_value, &exception_tb); - - - exception_lineno = 240; - - goto try_except_handler_28; - } - { - PyObject *old = Nuitka_Cell_GET(outline_8_var___class__); - PyCell_SET(outline_8_var___class__, tmp_assign_source_85); - Py_XDECREF(old); - } - - } - CHECK_OBJECT(Nuitka_Cell_GET(outline_8_var___class__)); - tmp_assign_source_84 = Nuitka_Cell_GET(outline_8_var___class__); - Py_INCREF(tmp_assign_source_84); - goto try_return_handler_28; - NUITKA_CANNOT_GET_HERE("tried codes exits in all cases"); - return NULL; - // Return handler code: - try_return_handler_28:; - Py_DECREF(locals_models$unet3d$losses$$$class__9_WeightedSmoothL1Loss_240); - locals_models$unet3d$losses$$$class__9_WeightedSmoothL1Loss_240 = NULL; - goto try_return_handler_27; - // Exception handler code: - try_except_handler_28:; - exception_keeper_type_26 = exception_type; - exception_keeper_value_26 = exception_value; - exception_keeper_tb_26 = exception_tb; - exception_keeper_lineno_26 = exception_lineno; - exception_type = NULL; - exception_value = NULL; - exception_tb = NULL; - exception_lineno = 0; - - Py_DECREF(locals_models$unet3d$losses$$$class__9_WeightedSmoothL1Loss_240); - locals_models$unet3d$losses$$$class__9_WeightedSmoothL1Loss_240 = NULL; - // Re-raise. - exception_type = exception_keeper_type_26; - exception_value = exception_keeper_value_26; - exception_tb = exception_keeper_tb_26; - exception_lineno = exception_keeper_lineno_26; - - goto try_except_handler_27; - // End of try: - NUITKA_CANNOT_GET_HERE("tried codes exits in all cases"); - return NULL; - // Return handler code: - try_return_handler_27:; - CHECK_OBJECT(outline_8_var___class__); - Py_DECREF(outline_8_var___class__); - outline_8_var___class__ = NULL; - goto outline_result_9; - // Exception handler code: - try_except_handler_27:; - exception_keeper_type_27 = exception_type; - exception_keeper_value_27 = exception_value; - exception_keeper_tb_27 = exception_tb; - exception_keeper_lineno_27 = exception_lineno; - exception_type = NULL; - exception_value = NULL; - exception_tb = NULL; - exception_lineno = 0; - - CHECK_OBJECT(outline_8_var___class__); - Py_DECREF(outline_8_var___class__); - outline_8_var___class__ = NULL; - // Re-raise. - exception_type = exception_keeper_type_27; - exception_value = exception_keeper_value_27; - exception_tb = exception_keeper_tb_27; - exception_lineno = exception_keeper_lineno_27; - - goto outline_exception_9; - // End of try: - NUITKA_CANNOT_GET_HERE("Return statement must have exited already."); - return NULL; - outline_exception_9:; - exception_lineno = 240; - goto try_except_handler_26; - outline_result_9:; - UPDATE_STRING_DICT1(moduledict_models$unet3d$losses, (Nuitka_StringObject *)mod_consts[115], tmp_assign_source_84); - } - goto try_end_10; - // Exception handler code: - try_except_handler_26:; - exception_keeper_type_28 = exception_type; - exception_keeper_value_28 = exception_value; - exception_keeper_tb_28 = exception_tb; - exception_keeper_lineno_28 = exception_lineno; - exception_type = NULL; - exception_value = NULL; - exception_tb = NULL; - exception_lineno = 0; - - Py_XDECREF(tmp_class_creation_9__bases_orig); - tmp_class_creation_9__bases_orig = NULL; - Py_XDECREF(tmp_class_creation_9__bases); - tmp_class_creation_9__bases = NULL; - Py_XDECREF(tmp_class_creation_9__class_decl_dict); - tmp_class_creation_9__class_decl_dict = NULL; - Py_XDECREF(tmp_class_creation_9__metaclass); - tmp_class_creation_9__metaclass = NULL; - Py_XDECREF(tmp_class_creation_9__prepared); - tmp_class_creation_9__prepared = NULL; - // Re-raise. - exception_type = exception_keeper_type_28; - exception_value = exception_keeper_value_28; - exception_tb = exception_keeper_tb_28; - exception_lineno = exception_keeper_lineno_28; - - goto frame_exception_exit_1; - // End of try: - try_end_10:; - - // Restore frame exception if necessary. -#if 0 - RESTORE_FRAME_EXCEPTION(frame_705bf4315d2d4f531dff5d3d03b1beec); -#endif - popFrameStack(); - - assertFrameObject(frame_705bf4315d2d4f531dff5d3d03b1beec); - - goto frame_no_exception_10; - - frame_exception_exit_1:; -#if 0 - RESTORE_FRAME_EXCEPTION(frame_705bf4315d2d4f531dff5d3d03b1beec); -#endif - - if (exception_tb == NULL) { - exception_tb = MAKE_TRACEBACK(frame_705bf4315d2d4f531dff5d3d03b1beec, exception_lineno); - } else if (exception_tb->tb_frame != &frame_705bf4315d2d4f531dff5d3d03b1beec->m_frame) { - exception_tb = ADD_TRACEBACK(exception_tb, frame_705bf4315d2d4f531dff5d3d03b1beec, exception_lineno); - } - - // Put the previous frame back on top. - popFrameStack(); - - // Return the error. - goto module_exception_exit; - - frame_no_exception_10:; - CHECK_OBJECT(tmp_class_creation_9__bases_orig); - Py_DECREF(tmp_class_creation_9__bases_orig); - tmp_class_creation_9__bases_orig = NULL; - Py_XDECREF(tmp_class_creation_9__bases); - tmp_class_creation_9__bases = NULL; - Py_XDECREF(tmp_class_creation_9__class_decl_dict); - tmp_class_creation_9__class_decl_dict = NULL; - Py_XDECREF(tmp_class_creation_9__metaclass); - tmp_class_creation_9__metaclass = NULL; - CHECK_OBJECT(tmp_class_creation_9__prepared); - Py_DECREF(tmp_class_creation_9__prepared); - tmp_class_creation_9__prepared = NULL; - { - PyObject *tmp_assign_source_86; - - - tmp_assign_source_86 = MAKE_FUNCTION_models$unet3d$losses$$$function__22_flatten(); - - UPDATE_STRING_DICT1(moduledict_models$unet3d$losses, (Nuitka_StringObject *)mod_consts[2], tmp_assign_source_86); - } - { - PyObject *tmp_assign_source_87; - - - tmp_assign_source_87 = MAKE_FUNCTION_models$unet3d$losses$$$function__23_get_loss_criterion(); - - UPDATE_STRING_DICT1(moduledict_models$unet3d$losses, (Nuitka_StringObject *)mod_consts[181], tmp_assign_source_87); - } - { - PyObject *tmp_assign_source_88; - - - tmp_assign_source_88 = MAKE_FUNCTION_models$unet3d$losses$$$function__24__create_loss(); - - UPDATE_STRING_DICT1(moduledict_models$unet3d$losses, (Nuitka_StringObject *)mod_consts[99], tmp_assign_source_88); - } - - return module_models$unet3d$losses; - module_exception_exit: - RESTORE_ERROR_OCCURRED(exception_type, exception_value, exception_tb); - return NULL; -} -