Skip to content
Snippets Groups Projects
Commit 234d15c9 authored by Christof Kaufmann's avatar Christof Kaufmann
Browse files

Improve style here and there a bit

parent 5b6143e1
No related branches found
No related tags found
No related merge requests found
......@@ -134,7 +134,7 @@ Wir erstellen nun eine Umgebung namens \lstinline|ml| mit Python 3.10 und den be
contextily networkx pyvis netgraph
\end{lstlisting}
Sie können die Umgebung jederzeit mit \lstinline|mamba activate ml| aktivieren und mit \lstinline|mamba deactivate| deaktivieren. Generell können Sie mit \lstinline|mamba create -n <ENVNAME> <PAKETE>| auch weitere Umgebungen einrichten und diese mit \lstinline|mamba activate <ENVNAME>| aktivieren.
Sie können die Umgebung jederzeit mit \lstinline|mamba activate ml| aktivieren und mit \lstinline|mamba deactivate| deaktivieren. Generell können Sie auch weitere Umgebungen mit \lstinline|mamba create -n <ENVNAME> <PAKETE>| einrichten und diese mit \lstinline|mamba activate <ENVNAME>| aktivieren.
Installieren Sie nun in der Umgebung \lstinline|ml| noch Pakete, die es (noch) nicht in conda-forge gibt, sondern nur in PyPI (bzw.\ EMNIST auf PyPI ist veraltet und wir verwenden direkt die Version von github). Hierdurch können allerdings Probleme in Ihrer Umgebung entstehen.
\begin{lstlisting}[gobble=2, basicstyle=\ttfamily\footnotesize]
......
......@@ -128,16 +128,15 @@ Nun sollte die \texttt{base}-Environment aktiviert sein, was Sie auch am Prompt
Wir erstellen nun eine Umgebung namens \lstinline|ml| mit Python 3.10 und den benötigten Paketen.
\begin{lstlisting}[gobble=2, basicstyle=\ttfamily\footnotesize]
mamba create -n ml python=3.10 matplotlib ipympl ipywidgets seaborn plotly git ^
scikit-learn optuna astunparse mypy jupyter notebook spyder ^
openpyxl odfpy lxml pyarrow fastparquet zstandard geopandas ^
"pyogrio<0.8.0" contextily networkx pyvis netgraph ^
jax-jumpy moviepy shimmy-atari gymnasium-box2d
mamba create -n ml python=3.10 seaborn plotly matplotlib ipympl ipywidgets ^
scikit-learn optuna astunparse git jupyter notebook spyder ^
openpyxl odfpy lxml pyarrow fastparquet zstandard mypy ^
geopandas "pyogrio<0.8.0" contextily networkx netgraph ^
pyvis jax-jumpy moviepy shimmy-atari gymnasium-box2d
\end{lstlisting}
Sie können die Umgebung jederzeit mit \lstinline|mamba activate ml| aktivieren und mit \lstinline|mamba deactivate| deaktivieren. Generell können Sie mit \lstinline|mamba create -n <MYENVNAME> <PAKETE>| auch weitere Umgebungen einrichten und diese mit \lstinline|mamba activate <MYENVNAME>| aktivieren.
Sie können die Umgebung jederzeit mit \lstinline|mamba activate ml| aktivieren und mit \lstinline|mamba deactivate| deaktivieren. Generell können Sie auch weitere Umgebungen mit \lstinline|mamba create -n <MYENVNAME> <PAKETE>| einrichten und diese mit \lstinline|mamba activate <MYENVNAME>| aktivieren.
Anschließend installieren wir noch Pakete mit \lstinline|pip| aus dem PyPI-Repository in der Umgebung \lstinline|ml|, die es im \lstinline|conda-forge|-Repository nicht gibt. Hierdurch können allerdings Probleme in Ihrer Umgebung entstehen.
Anschließend installieren wir noch Pakete mit \lstinline|pip| aus dem PyPI-Repository (bzw.\ von github) in der Umgebung \lstinline|ml|, die es im \lstinline|conda-forge|-Repository nicht gibt. Hierdurch können allerdings Probleme in Ihrer Umgebung entstehen.
\begin{lstlisting}[gobble=2, basicstyle=\ttfamily\footnotesize]
#*\color{gray}(base) C:\textbackslash Users\textbackslash john>*mamba activate ml
#*\color{gray}(ml) C:\textbackslash Users\textbackslash john>*pip install tensorflow-cpu
......
......@@ -144,7 +144,7 @@ The Spyder window opens now. Open the test script \texttt{mnistKeras.py} (\texta
The test script will output the TensorFlow version, e.\,g.:
\begin{lstlisting}
=========================
Tensorflow Version 2.10.0
TensorFlow Version 2.10.0
=========================
\end{lstlisting}
Then TensorFlow will download the required data set once and train a neural network. The progress will be printed in the console. Finally the accuracy on the test set will be shown and some sample images will be plotted in the \textit{Plots} pane. This means Python and TensorFlow have been installed successfully.
......
......@@ -92,7 +92,7 @@ and install Miniforge. We recommend to leave the default settings especially to
\begin{minipage}{0.37\linewidth}
\includegraphics[width=\linewidth]{images/mambaforge-start-menu-prompt}
\end{minipage}%
\begin{lstlisting}[gobble=2]
\begin{lstlisting}[gobble=2, basicstyle=\ttfamily\footnotesize]
#*\color{gray}(base) C:\textbackslash Users\textbackslash john>*
\end{lstlisting}
Now we are ready to install the packages we need.
......@@ -110,12 +110,12 @@ Let's create a new environment called \textit{weai} and add the packages we need
pyarrow pandas optuna plotly
\end{lstlisting}
You will get a list of packages and can confirm with \keyenter. Installation takes a while. Since \lstinline|tensorflow| is not yet available for Windows on \texttt{conda-forge}, we need to install it from \textit{PyPI} using \lstinline|pip| into the \textit{weai} environment:
\begin{lstlisting}[gobble=2]
\begin{lstlisting}[gobble=2, basicstyle=\ttfamily\footnotesize]
#*\color{gray}(base) C:\textbackslash Users\textbackslash john>*mamba activate weai
#*\color{gray}(weai) C:\textbackslash Users\textbackslash john>*pip install tensorflow==2.10.1
\end{lstlisting}
If you have an NVIDIA GPU and want to activate support for it, install the following packages:
\begin{lstlisting}[gobble=2]
\begin{lstlisting}[gobble=2, basicstyle=\ttfamily\footnotesize]
#*\color{gray}(weai) C:\textbackslash Users\textbackslash john>*mamba install -c nvidia cudatoolkit cudnn cuda-nvcc
\end{lstlisting}
and optionally (not required for Spyder) also add the path to the corresponding libraries (e.\,g.\ \textit{cudnn64\_8.dll}) and tools (\texttt{ptxas.exe}) in your user environment variable \lstinline|Path|, for example:
......@@ -151,7 +151,7 @@ The Spyder window opens now. Open the test script \texttt{mnistKeras.py} (\texta
The test script will output the TensorFlow version, e.\,g.:
\begin{lstlisting}
=========================
Tensorflow Version 2.10.1
TensorFlow Version 2.10.1
=========================
\end{lstlisting}
Then TensorFlow will download the required data set once and train a neural network. The progress will be printed in the console. Finally the accuracy on the test set will be shown and some sample images will be plotted in the \textit{Plots} pane. This means Python and TensorFlow have been installed successfully.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment