|
28 | 28 | }, |
29 | 29 | { |
30 | 30 | "cell_type": "code", |
31 | | - "execution_count": 1, |
| 31 | + "execution_count": null, |
32 | 32 | "metadata": { |
33 | 33 | "ExecuteTime": { |
34 | 34 | "end_time": "2025-02-14T10:51:27.573003Z", |
35 | 35 | "start_time": "2025-02-14T10:51:27.568939Z" |
36 | 36 | } |
37 | 37 | }, |
38 | | - "outputs": [ |
39 | | - { |
40 | | - "name": "stderr", |
41 | | - "output_type": "stream", |
42 | | - "text": [ |
43 | | - "WARNING:bayesflow:\n", |
44 | | - "When using torch backend, we need to disable autograd by default to avoid excessive memory usage. Use\n", |
45 | | - "\n", |
46 | | - "with torch.enable_grad():\n", |
47 | | - " ...\n", |
48 | | - "\n", |
49 | | - "in contexts where you need gradients (e.g. custom training loops).\n" |
50 | | - ] |
51 | | - } |
52 | | - ], |
| 38 | + "outputs": [], |
53 | 39 | "source": [ |
54 | 40 | "import numpy as np\n", |
55 | 41 | "from pathlib import Path\n", |
|
599 | 585 | }, |
600 | 586 | { |
601 | 587 | "cell_type": "code", |
602 | | - "execution_count": 19, |
| 588 | + "execution_count": null, |
603 | 589 | "metadata": { |
604 | 590 | "ExecuteTime": { |
605 | 591 | "end_time": "2025-02-14T10:52:51.132695Z", |
|
619 | 605 | } |
620 | 606 | ], |
621 | 607 | "source": [ |
622 | | - "f = bf.diagnostics.plots.loss(history, )" |
| 608 | + "f = bf.diagnostics.plots.loss(history)" |
623 | 609 | ] |
624 | 610 | }, |
625 | 611 | { |
|
965 | 951 | }, |
966 | 952 | { |
967 | 953 | "cell_type": "code", |
968 | | - "execution_count": 30, |
| 954 | + "execution_count": null, |
969 | 955 | "metadata": {}, |
970 | | - "outputs": [ |
971 | | - { |
972 | | - "name": "stderr", |
973 | | - "output_type": "stream", |
974 | | - "text": [ |
975 | | - "2025-04-21 11:54:04.969579: I tensorflow/core/util/port.cc:153] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.\n", |
976 | | - "2025-04-21 11:54:04.977366: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:467] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered\n", |
977 | | - "WARNING: All log messages before absl::InitializeLog() is called are written to STDERR\n", |
978 | | - "E0000 00:00:1745250844.984817 4140753 cuda_dnn.cc:8579] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered\n", |
979 | | - "E0000 00:00:1745250844.987174 4140753 cuda_blas.cc:1407] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered\n", |
980 | | - "W0000 00:00:1745250844.993850 4140753 computation_placer.cc:177] computation placer already registered. Please check linkage and avoid linking the same target more than once.\n", |
981 | | - "W0000 00:00:1745250844.993860 4140753 computation_placer.cc:177] computation placer already registered. Please check linkage and avoid linking the same target more than once.\n", |
982 | | - "W0000 00:00:1745250844.993861 4140753 computation_placer.cc:177] computation placer already registered. Please check linkage and avoid linking the same target more than once.\n", |
983 | | - "W0000 00:00:1745250844.993863 4140753 computation_placer.cc:177] computation placer already registered. Please check linkage and avoid linking the same target more than once.\n", |
984 | | - "2025-04-21 11:54:04.996047: I tensorflow/core/platform/cpu_feature_guard.cc:210] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.\n", |
985 | | - "To enable the following instructions: AVX2 AVX_VNNI FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.\n" |
986 | | - ] |
987 | | - } |
988 | | - ], |
| 956 | + "outputs": [], |
989 | 957 | "source": [ |
990 | 958 | "# Recommended - full serialization (checkpoints folder must exist)\n", |
991 | 959 | "filepath = Path(\"checkpoints\") / \"regression.keras\"\n", |
|
1005 | 973 | }, |
1006 | 974 | { |
1007 | 975 | "cell_type": "code", |
1008 | | - "execution_count": 31, |
| 976 | + "execution_count": null, |
1009 | 977 | "metadata": {}, |
1010 | | - "outputs": [ |
1011 | | - { |
1012 | | - "name": "stderr", |
1013 | | - "output_type": "stream", |
1014 | | - "text": [ |
1015 | | - "/home/radevs/anaconda3/envs/bf/lib/python3.11/site-packages/keras/src/saving/serialization_lib.py:734: UserWarning: `compile()` was not called as part of model loading because the model's `compile()` method is custom. All subclassed Models that have `compile()` overridden should also override `get_compile_config()` and `compile_from_config(config)`. Alternatively, you can call `compile()` manually after loading.\n", |
1016 | | - " instance.compile_from_config(compile_config)\n" |
1017 | | - ] |
1018 | | - } |
1019 | | - ], |
| 978 | + "outputs": [], |
1020 | 979 | "source": [ |
1021 | 980 | "# Load approximator\n", |
1022 | 981 | "approximator = keras.saving.load_model(filepath)" |
|
1055 | 1014 | " variable_names=par_names\n", |
1056 | 1015 | ")" |
1057 | 1016 | ] |
1058 | | - }, |
1059 | | - { |
1060 | | - "cell_type": "code", |
1061 | | - "execution_count": null, |
1062 | | - "metadata": {}, |
1063 | | - "outputs": [], |
1064 | | - "source": [] |
1065 | 1017 | } |
1066 | 1018 | ], |
1067 | 1019 | "metadata": { |
|
1076 | 1028 | "name": "python3" |
1077 | 1029 | }, |
1078 | 1030 | "language_info": { |
1079 | | - "codemirror_mode": { |
1080 | | - "name": "ipython", |
1081 | | - "version": 3 |
1082 | | - }, |
1083 | | - "file_extension": ".py", |
1084 | | - "mimetype": "text/x-python", |
1085 | | - "name": "python", |
1086 | | - "nbconvert_exporter": "python", |
1087 | | - "pygments_lexer": "ipython3", |
1088 | | - "version": "3.11.11" |
| 1031 | + "name": "python" |
1089 | 1032 | }, |
1090 | 1033 | "widgets": { |
1091 | 1034 | "application/vnd.jupyter.widget-state+json": { |
|
0 commit comments