Jede Zelle nacheinader ausführen, um RAM zu umegehen

This commit is contained in:
klappstuhl 2024-01-07 14:06:07 +01:00
parent 3f0bc4faf9
commit b1e6f68ee7
1 changed files with 82 additions and 4 deletions

View File

@ -541,8 +541,12 @@
" self.results = results\n", " self.results = results\n",
"\n", "\n",
" # Speichern der Daten in einer lokalen Datei\n", " # Speichern der Daten in einer lokalen Datei\n",
" if len(n_pca_components) > 1:\n",
" with open('Experiments/results.pickle', 'wb') as f:\n", " with open('Experiments/results.pickle', 'wb') as f:\n",
" pickle.dump(self.results, f)\n", " pickle.dump(self.results, f)\n",
" else:\n",
" with open(f'Experiments/{str(n_pca_components[0])}/results_{str(n_pca_components[0])}.pickle', 'wb') as f:\n",
" pickle.dump(self.results, f)\n",
"\n", "\n",
" plt.ion()\n", " plt.ion()\n",
"\n", "\n",
@ -610,14 +614,88 @@
" " " "
] ]
}, },
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Starten der einzelnen Experimente, da in einer Schleife RAM Probleme auftreten"
]
},
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": null, "execution_count": null,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
"e = ExperimentationalExperiments()\n", "e1 = ExperimentationalExperiments()\n",
"results = e.run([1024, 512, 256, 128, 64, 32, 16], 10, n_epochs=500)" "results = e1.run([1024], 10, n_epochs=500)\n",
"del e1"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"e2 = ExperimentationalExperiments()\n",
"results = e2.run([512], 10, n_epochs=500)\n",
"del e2"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"e3 = ExperimentationalExperiments()\n",
"results = e3.run([256], 10, n_epochs=500)\n",
"del e3"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"e4 = ExperimentationalExperiments()\n",
"results = e4.run([128], 10, n_epochs=500)\n",
"del e4"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"e5 = ExperimentationalExperiments()\n",
"results = e5.run([64], 10, n_epochs=500)\n",
"del e5"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"e6 = ExperimentationalExperiments()\n",
"results = e6.run([32], 10, n_epochs=500)\n",
"del e6"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"e7 = ExperimentationalExperiments()\n",
"results = e7.run([16], 2, n_epochs=10)\n",
"del e7"
] ]
}, },
{ {