|
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 | "\n",
|
|
598 | 584 | },
|
599 | 585 | {
|
600 | 586 | "cell_type": "code",
|
601 |
| - "execution_count": 19, |
| 587 | + "execution_count": null, |
602 | 588 | "metadata": {
|
603 | 589 | "ExecuteTime": {
|
604 | 590 | "end_time": "2025-02-14T10:52:51.132695Z",
|
|
618 | 604 | }
|
619 | 605 | ],
|
620 | 606 | "source": [
|
621 |
| - "f = bf.diagnostics.plots.loss(history, )" |
| 607 | + "f = bf.diagnostics.plots.loss(history)" |
622 | 608 | ]
|
623 | 609 | },
|
624 | 610 | {
|
|
964 | 950 | },
|
965 | 951 | {
|
966 | 952 | "cell_type": "code",
|
967 |
| - "execution_count": 30, |
| 953 | + "execution_count": null, |
968 | 954 | "metadata": {},
|
969 |
| - "outputs": [ |
970 |
| - { |
971 |
| - "name": "stderr", |
972 |
| - "output_type": "stream", |
973 |
| - "text": [ |
974 |
| - "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", |
975 |
| - "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", |
976 |
| - "WARNING: All log messages before absl::InitializeLog() is called are written to STDERR\n", |
977 |
| - "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", |
978 |
| - "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", |
979 |
| - "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", |
980 |
| - "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", |
981 |
| - "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", |
982 |
| - "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", |
983 |
| - "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", |
984 |
| - "To enable the following instructions: AVX2 AVX_VNNI FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.\n" |
985 |
| - ] |
986 |
| - } |
987 |
| - ], |
| 955 | + "outputs": [], |
988 | 956 | "source": [
|
989 | 957 | "# Recommended - full serialization (checkpoints folder must exist)\n",
|
990 | 958 | "workflow.approximator.save(filepath=\"checkpoints/regression.keras\")\n",
|
|
1002 | 970 | },
|
1003 | 971 | {
|
1004 | 972 | "cell_type": "code",
|
1005 |
| - "execution_count": 31, |
| 973 | + "execution_count": null, |
1006 | 974 | "metadata": {},
|
1007 |
| - "outputs": [ |
1008 |
| - { |
1009 |
| - "name": "stderr", |
1010 |
| - "output_type": "stream", |
1011 |
| - "text": [ |
1012 |
| - "/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", |
1013 |
| - " instance.compile_from_config(compile_config)\n" |
1014 |
| - ] |
1015 |
| - } |
1016 |
| - ], |
| 975 | + "outputs": [], |
1017 | 976 | "source": [
|
1018 | 977 | "# Load approximator\n",
|
1019 | 978 | "approximator = keras.saving.load_model(\"checkpoints/regression.keras\")"
|
|
1052 | 1011 | " variable_names=par_names\n",
|
1053 | 1012 | ")"
|
1054 | 1013 | ]
|
1055 |
| - }, |
1056 |
| - { |
1057 |
| - "cell_type": "code", |
1058 |
| - "execution_count": null, |
1059 |
| - "metadata": {}, |
1060 |
| - "outputs": [], |
1061 |
| - "source": [] |
1062 | 1014 | }
|
1063 | 1015 | ],
|
1064 | 1016 | "metadata": {
|
|
1073 | 1025 | "name": "python3"
|
1074 | 1026 | },
|
1075 | 1027 | "language_info": {
|
1076 |
| - "codemirror_mode": { |
1077 |
| - "name": "ipython", |
1078 |
| - "version": 3 |
1079 |
| - }, |
1080 |
| - "file_extension": ".py", |
1081 |
| - "mimetype": "text/x-python", |
1082 |
| - "name": "python", |
1083 |
| - "nbconvert_exporter": "python", |
1084 |
| - "pygments_lexer": "ipython3", |
1085 |
| - "version": "3.11.11" |
| 1028 | + "name": "python" |
1086 | 1029 | },
|
1087 | 1030 | "widgets": {
|
1088 | 1031 | "application/vnd.jupyter.widget-state+json": {
|
|
0 commit comments