{ "cells": [ { "cell_type": "code", "execution_count": 1, "id": "b9b5254c", "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "2022-06-13 18:29:33.355426: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcudart.so.11.0'; dlerror: libcudart.so.11.0: cannot open shared object file: No such file or directory\n", "2022-06-13 18:29:33.355447: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.\n" ] } ], "source": [ "from library.analysis import loadDataset, testSets\n", "from library.generators.ConvGeN import ConvGeN" ] }, { "cell_type": "code", "execution_count": 2, "id": "e2dd116d", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Load 'data_input/folding_flare-F'\n", "from pickle file\n", "non empty cut in data_input/folding_flare-F! (23 points)\n", "Data loaded.\n" ] } ], "source": [ "data = loadDataset(\"data_input/\" + testSets[4])" ] }, { "cell_type": "code", "execution_count": 3, "id": "6d686da5", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "(1066, 1023, 43)\n" ] } ], "source": [ "print((len(data.data), len(data.data0), len(data.data1)))" ] }, { "cell_type": "code", "execution_count": 4, "id": "01d71d6a", "metadata": {}, "outputs": [], "source": [ "gen = ConvGeN(data.data0.shape[1], neb=5)" ] }, { "cell_type": "code", "execution_count": 5, "id": "ad01be2b", "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "2022-06-13 18:29:35.134261: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcuda.so.1'; dlerror: libcuda.so.1: cannot open shared object file: No such file or directory\n", "2022-06-13 18:29:35.134290: W tensorflow/stream_executor/cuda/cuda_driver.cc:269] failed call to cuInit: UNKNOWN ERROR (303)\n", "2022-06-13 18:29:35.134310: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:156] kernel driver does not appear to be running on this host (sbi-klabautermann): /proc/driver/nvidia/version does not exist\n", "2022-06-13 18:29:35.134557: I tensorflow/core/platform/cpu_feature_guard.cc:151] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX2 FMA\n", "To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.\n" ] } ], "source": [ "gen.reset(data)" ] }, { "cell_type": "code", "execution_count": 6, "id": "4698522c", "metadata": {}, "outputs": [], "source": [ "gen.train(data)" ] }, { "cell_type": "code", "execution_count": 7, "id": "cda17654", "metadata": {}, "outputs": [], "source": [ "syntheticPoints = gen.generateData(10)" ] }, { "cell_type": "code", "execution_count": 8, "id": "41853bd3", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "array([[1.9999962 , 0.8138561 , 0.18614197, 1.1861401 , 0. ,\n", " 0.9999981 , 0.9999981 , 0.9999981 , 0. , 0. ,\n", " 0. ],\n", " [1.2640123 , 0.4237353 , 0.9442571 , 0.9999993 , 0. ,\n", " 0.9999993 , 0.9999993 , 0. , 3.632004 , 0. ,\n", " 0. ],\n", " [0. , 0.123703 , 0.99999845, 0.99999845, 0. ,\n", " 0.99999845, 0.99999845, 0. , 0.99999845, 0. ,\n", " 0. ],\n", " [0. , 0.9999981 , 0.958097 , 0.9999981 , 0. ,\n", " 0.9999981 , 0.9999981 , 0. , 0. , 0. ,\n", " 0. ],\n", " [1.9999985 , 0.67955816, 0.9999992 , 1.3204403 , 1.1185625 ,\n", " 0.9999992 , 0.9999992 , 0.6477282 , 0.5342972 , 0. ,\n", " 0. ],\n", " [2.9999838 , 0.99999464, 0. , 0.99999464, 0. ,\n", " 0.99999464, 0.99999464, 0. , 0.99999464, 0. ,\n", " 0. ],\n", " [0. , 0.99999905, 0. , 0.99999905, 0. ,\n", " 0.99999905, 0.99999905, 0. , 1.9999981 , 0. ,\n", " 0. ],\n", " [1.041093 , 0.85719097, 0.99999857, 0.99999857, 0. ,\n", " 0.99999857, 0.99999857, 0.37773895, 2.3873253 , 0. ,\n", " 0. ],\n", " [3.999983 , 1.9004215 , 0.99999577, 0.99999577, 0. ,\n", " 0.0995701 , 0.99999577, 0. , 0. , 0. ,\n", " 0. ],\n", " [0. , 0.9999983 , 0. , 0. , 0. ,\n", " 0.9999983 , 0.9999983 , 0. , 0. , 0. ,\n", " 0. ]], dtype=float32)" ] }, "execution_count": 8, "metadata": {}, "output_type": "execute_result" } ], "source": [ "syntheticPoints" ] } ], "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.9.7" } }, "nbformat": 4, "nbformat_minor": 5 }