refactoring

This commit is contained in:
frankknoll
2023-03-15 17:32:57 +01:00
parent 5379644a89
commit 3413982f28

View File

@@ -217,48 +217,10 @@
},
"outputs": [],
"source": [
"modelDAO = ModelDAO(inColab)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "cpxO7yGAMf3z"
},
"outputs": [],
"source": [
"charNumConverter = CharNumConverter(CaptchaGenerator.characters)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "tVb5nDFTMf3z"
},
"outputs": [],
"source": [
"predictionsDecoder = PredictionsDecoder(CaptchaGenerator.captchaLength, charNumConverter.num_to_char)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"captchaShape = CaptchaShape()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "s35OUslsMf30"
},
"outputs": [],
"source": [
"modelDAO = ModelDAO(inColab)\n",
"charNumConverter = CharNumConverter(CaptchaGenerator.characters)\n",
"predictionsDecoder = PredictionsDecoder(CaptchaGenerator.captchaLength, charNumConverter.num_to_char)\n",
"captchaShape = CaptchaShape()\n",
"datasetFactory = DatasetFactory(captchaShape, charNumConverter.char_to_num, batch_size = 64)"
]
},
@@ -336,17 +298,6 @@
" displayImagesInGrid(4, images, predictionsDecoder.asStrings(labels), ['black'] * len(labels))"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "V8ELN-qJ3MGe"
},
"outputs": [],
"source": [
"modelFactory = ModelFactory(captchaShape, charNumConverter.char_to_num)"
]
},
{
"cell_type": "code",
"execution_count": null,
@@ -355,6 +306,7 @@
},
"outputs": [],
"source": [
"modelFactory = ModelFactory(captchaShape, charNumConverter.char_to_num)\n",
"model = modelFactory.createMobileNetV3Small()\n",
"model.summary()"
]