wz-load, tensorflow cpu
parent
119b6e529b
commit
b7916b8dae
|
@ -19,6 +19,11 @@ pip install --user --upgrade pip
|
|||
## Clone Git Repo
|
||||
Get source code with `git`.
|
||||
|
||||
The default `requirements.txt` installs a tensorflow without
|
||||
GPU support. You can edit the `requirements.txt` file to change
|
||||
which is supported. The "generic" version supports both.
|
||||
|
||||
|
||||
```
|
||||
git clone https://spacecruft.org/spacecruft/witzit
|
||||
cd witzit/
|
||||
|
|
|
@ -1 +1,3 @@
|
|||
tensorflow
|
||||
#tensorflow==2.7.0
|
||||
tensorflow_cpu==2.7.0
|
||||
#tensorflow_gpu==2.7.0
|
||||
|
|
|
@ -0,0 +1,49 @@
|
|||
#!/usr/bin/python3
|
||||
#
|
||||
# witzit
|
||||
#
|
||||
# Copyright (C) 2022, Jeff Moe
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# wz-load
|
||||
# Load a sample from a SciAps LIBS
|
||||
#
|
||||
# Sample files can be found here:
|
||||
# https://ordar.otelo.univ-lorraine.fr/record?id=10.24396/ORDAR-65
|
||||
|
||||
import os
|
||||
import json
|
||||
import numpy as np
|
||||
import datetime
|
||||
import tensorflow as tf
|
||||
import tensorflow.python.keras
|
||||
from tensorflow.keras.layers import Dense, Conv2D, Flatten, Dropout, MaxPooling2D
|
||||
from tensorflow.python.keras import optimizers
|
||||
from tensorflow.python.keras import Sequential
|
||||
from tensorflow.python.keras.layers import Activation, Dropout, Flatten, Dense
|
||||
from tensorflow.python.keras.layers import Convolution2D, MaxPooling2D, ZeroPadding2D
|
||||
from tensorflow.python.keras.layers import Input, concatenate
|
||||
from tensorflow.python.keras.models import load_model
|
||||
from tensorflow.python.keras.models import Model
|
||||
from tensorflow.python.keras.preprocessing import image
|
||||
from tensorflow.python.keras.preprocessing.image import img_to_array
|
||||
from tensorflow.python.keras.preprocessing.image import ImageDataGenerator
|
||||
from tensorflow.python.keras.preprocessing.image import load_img
|
||||
|
||||
print("Tensorflow Version: ", tf.__version__)
|
||||
print("Num GPUs Available: ", len(tf.config.experimental.list_physical_devices('GPU')))
|
||||
print("Num CPUs Available: ", len(tf.config.experimental.list_physical_devices('CPU')))
|
||||
print(tf.config.experimental.list_physical_devices())
|
||||
|
Loading…
Reference in New Issue