Open JamesTimothyMeech opened 3 years ago
And a presumably related error when attempting to train the classifiers:
Jamess-MacBook-Pro-2:physiogan james$ python3.7 classification_model.py --dataset=har --num_epochs=200
Traceback (most recent call last):
File "classification_model.py", line 4, in
for the first problem, I think this error is because you are running on Mac which doesn't support Tensorflow-GPU. You can install Tensorflow without GPU on MAC but it will much slower. Also I think you may need (need sure) an older version (Python 3.5) to install the older version of tensorflow 1.14.
The second problem is also related: The code was written with Tensorflow 1.14.0. If you want to use TensorFlow 2.0 then code has to be updated.
Thanks, running with python 3.5 allowed me to train the classifier but now I run into this error when attempting to train the generative model. Am I missing something obvious here?
Jamess-MacBook-Pro-2:physiogan james$ python3.5 crnn_model.py --model_type=crvae --num_epochs=15000 --dataset=har --aux_restore=logs --batch_size=1024 --num_units=128 --z_dim=16 --bidir_encoder=True --z_context=True /Users/james/Library/Python/3.5/lib/python/site-packages/tensorflow/python/framework/dtypes.py:516: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. _np_qint8 = np.dtype([("qint8", np.int8, 1)]) /Users/james/Library/Python/3.5/lib/python/site-packages/tensorflow/python/framework/dtypes.py:517: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. _np_quint8 = np.dtype([("quint8", np.uint8, 1)]) /Users/james/Library/Python/3.5/lib/python/site-packages/tensorflow/python/framework/dtypes.py:518: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. _np_qint16 = np.dtype([("qint16", np.int16, 1)]) /Users/james/Library/Python/3.5/lib/python/site-packages/tensorflow/python/framework/dtypes.py:519: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. _np_quint16 = np.dtype([("quint16", np.uint16, 1)]) /Users/james/Library/Python/3.5/lib/python/site-packages/tensorflow/python/framework/dtypes.py:520: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. _np_qint32 = np.dtype([("qint32", np.int32, 1)]) /Users/james/Library/Python/3.5/lib/python/site-packages/tensorflow/python/framework/dtypes.py:525: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. np_resource = np.dtype([("resource", np.ubyte, 1)]) /Users/james/Library/Python/3.5/lib/python/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:541: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. _np_qint8 = np.dtype([("qint8", np.int8, 1)]) /Users/james/Library/Python/3.5/lib/python/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:542: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. _np_quint8 = np.dtype([("quint8", np.uint8, 1)]) /Users/james/Library/Python/3.5/lib/python/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:543: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. _np_qint16 = np.dtype([("qint16", np.int16, 1)]) /Users/james/Library/Python/3.5/lib/python/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:544: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. _np_quint16 = np.dtype([("quint16", np.uint16, 1)]) /Users/james/Library/Python/3.5/lib/python/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:545: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. _np_qint32 = np.dtype([("qint32", np.int32, 1)]) /Users/james/Library/Python/3.5/lib/python/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:550: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. np_resource = np.dtype([("resource", np.ubyte, 1)]) WARNING:tensorflow:From /Users/james/Desktop/physiogan/ecg_dataset.py:13: The name tf.enable_eager_execution is deprecated. Please use tf.compat.v1.enable_eager_execution instead.
WARNING:tensorflow:From /Users/james/Desktop/physiogan/train_utils.py:6: The name tf.losses.sparse_softmax_cross_entropy is deprecated. Please use tf.compat.v1.losses.sparse_softmax_cross_entropy instead.
(array([0, 1, 2, 3, 4, 5], dtype=int32), array([1226, 1073, 986, 1286, 1374, 1407])) (7352, 32, 6) (array([0, 1, 2, 3, 4, 5], dtype=int32), array([496, 471, 420, 491, 532, 537])) (2947, 32, 6) 2021-04-26 08:48:44.712686: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA WARNING:tensorflow:From crnn_model.py:94: The name tf.train.AdamOptimizer is deprecated. Please use tf.compat.v1.train.AdamOptimizer instead.
Aux. classifier Model restored from logs WARNING:tensorflow:From crnn_model.py:125: The name tf.random_normal is deprecated. Please use tf.random.normal instead.
Traceback (most recent call last):
File "crnn_model.py", line 130, in initial_state
was passed that is not compatible with cell.state_size
. Received state_spec
=ListWrapper([InputSpec(shape=(18, 128), ndim=2)]); however cell.state_size
is [128, 128]
python3.7 -m pip install -r requirements.txt Defaulting to user installation because normal site-packages is not writeable Requirement already satisfied: matplotlib in /Users/james/Library/Python/3.7/lib/python/site-packages (from -r requirements.txt (line 1)) (3.4.1) Requirement already satisfied: scikit-learn in /Users/james/Library/Python/3.7/lib/python/site-packages (from -r requirements.txt (line 2)) (0.24.1) ERROR: Could not find a version that satisfies the requirement tensorflow-gpu==1.14.0 ERROR: No matching distribution found for tensorflow-gpu==1.14.0