mirror of
https://github.com/sbrl/research-rainfallradar
synced 2024-11-14 21:53:03 +00:00
91 lines
2.1 KiB
Text
91 lines
2.1 KiB
Text
|
{
|
||
|
"cells": [
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": null,
|
||
|
"id": "1f6fdebf-69c5-46ab-a5a8-f9c91f000ff3",
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"import tensorflow as tf\n",
|
||
|
"\n",
|
||
|
"from lib.dataset.dataset_segmenter import dataset_segmenter\n",
|
||
|
"from lib.dataset.batched_iterator import batched_iterator"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": null,
|
||
|
"id": "4a6a94dd-5c4e-4481-bfae-eb5ccf6214db",
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"dirpath=\"/home/bryan-smithl/Documents/repos/PhD-Rainfall-Radar/aimodel/output/rainfallwater_records_embed_2022-10-06_contrast_embed_umap_d512e19_tfrecord\""
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": null,
|
||
|
"id": "d1aa931a-ecf2-4134-8e70-87db4ae60736",
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"dataset_train, dataset_validate = dataset_segmenter(\n",
|
||
|
"\tdirpath_input=dirpath,\n",
|
||
|
"\tbatch_size=32,\n",
|
||
|
"\twater_threshold=0.1,\n",
|
||
|
"\tshape_water_desired=[94, 94]\n",
|
||
|
")"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": null,
|
||
|
"id": "456f7c8f-3f7d-4a2c-b361-900588c49612",
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"i = 0\n",
|
||
|
"for (items, label) in dataset_train:\n",
|
||
|
" #print(\"ITEMS\", len(items), [ item.shape for item in items ])\n",
|
||
|
" print(\"ITEMS\", len(items), items)\n",
|
||
|
" print(\"LABEL\", label)\n",
|
||
|
" \n",
|
||
|
" i+= 1\n",
|
||
|
" if i > 5:\n",
|
||
|
" break\n",
|
||
|
"print(\"ITEMS DONE\")"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": null,
|
||
|
"id": "d682fb59-c6a3-4ae9-9683-2eae2f36a5eb",
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": []
|
||
|
}
|
||
|
],
|
||
|
"metadata": {
|
||
|
"kernelspec": {
|
||
|
"display_name": "Python 3 (ipykernel)",
|
||
|
"language": "python",
|
||
|
"name": "python3"
|
||
|
},
|
||
|
"language_info": {
|
||
|
"codemirror_mode": {
|
||
|
"name": "ipython",
|
||
|
"version": 3
|
||
|
},
|
||
|
"file_extension": ".py",
|
||
|
"mimetype": "text/x-python",
|
||
|
"name": "python",
|
||
|
"nbconvert_exporter": "python",
|
||
|
"pygments_lexer": "ipython3",
|
||
|
"version": "3.10.6"
|
||
|
}
|
||
|
},
|
||
|
"nbformat": 4,
|
||
|
"nbformat_minor": 5
|
||
|
}
|