tensorflow

Keras isn't using Theano

霸气de小男生 提交于 2021-02-05 09:32:30
问题 1- I create a virtual env: mkvirtualenv kerasTH 2- I install keras using pip install keras 3- That's the output for pip list Package Version ------------- ------- h5py 2.10.0 joblib 0.16.0 Keras 2.4.3 numpy 1.19.1 Pillow 7.2.0 pip 20.2.2 PyYAML 5.3.1 scikit-learn 0.23.2 scipy 1.5.2 setuptools 49.6.0 six 1.15.0 Theano 1.0.5 threadpoolctl 2.1.0 wheel 0.35.1 When I run python and then import keras I get this error ImportError: Keras requires TensorFlow 2.2 or higher. Install TensorFlow via `pip

What operators are there for remote communication

被刻印的时光 ゝ 提交于 2021-02-05 09:27:33
问题 I know I can spawn a TF server and configure a cluster and then use tf.device or remote_call . But what can I use in a standard session? I know there is Horovod. Tensorpack also provides some ZMQ ops. But is there something official? 来源: https://stackoverflow.com/questions/61993679/what-operators-are-there-for-remote-communication

TensorFlow 2.x: Cannot save trained model in h5 format (OSError: Unable to create link (name already exists))

◇◆丶佛笑我妖孽 提交于 2021-02-05 09:13:24
问题 My model uses pre-processed data to predict if a customer is a private or non-private customer. The pre-processing-step is using steps like feature_column.bucketized_column(…), feature_column.embedding_column(…) and so on. After the training, I am trying to save the model but I get the following error: File "h5py_objects.pyx", line 54, in h5py._objects.with_phil.wrapper File "h5py_objects.pyx", line 55, in h5py._objects.with_phil.wrapper File "h5py\h5o.pyx", line 202, in h5py.h5o.link OSError

TensorFlow 2.x: Cannot save trained model in h5 format (OSError: Unable to create link (name already exists))

霸气de小男生 提交于 2021-02-05 09:12:07
问题 My model uses pre-processed data to predict if a customer is a private or non-private customer. The pre-processing-step is using steps like feature_column.bucketized_column(…), feature_column.embedding_column(…) and so on. After the training, I am trying to save the model but I get the following error: File "h5py_objects.pyx", line 54, in h5py._objects.with_phil.wrapper File "h5py_objects.pyx", line 55, in h5py._objects.with_phil.wrapper File "h5py\h5o.pyx", line 202, in h5py.h5o.link OSError

R, TensorFlow, Anaconda Install on Windows

ぐ巨炮叔叔 提交于 2021-02-05 09:01:38
问题 I'm tryiing to install tensorflow for R. For this purpose I installed the latest version of Anaconda (4.3.1) to my OS and installed everything as described in: https://rstudio.github.io/tensorflow/installation.html To get started, install the tensorflow R package from GitHub as follows: devtools::install_github("rstudio/tensorflow") Then, use the install_tensorflow() function to install TensorFlow: library(tensorflow) install_tensorflow() The result of this process is a folder ~\AppData\Local

How can I explore and modify the created dataset from tf.keras.preprocessing.image_dataset_from_directory()?

穿精又带淫゛_ 提交于 2021-02-05 08:51:43
问题 Here's how I used the function: dataset = tf.keras.preprocessing.image_dataset_from_directory( main_directory, labels='inferred', image_size=(299, 299), validation_split=0.1, subset='training', seed=123 ) I'd like to explore the created dataset much like in this example, particularly the part where it was converted to a pandas dataframe. But my minimum goal is to check the labels and the number of files attached to it, just to check if, indeed, it created the dataset as expected (sub

Can't install tensorflow on python 3.9

被刻印的时光 ゝ 提交于 2021-02-05 08:22:18
问题 When I try to install tensorflow on python 3.9 I get following error: ERROR: Could not find a version that satisfies the requirement tensorflow (from versions: none) ERROR: No matching distribution found for tensorflow Is not there any tensorflow for 3.9? What do you guys recommend? Can I install other version of python beside the existing version? 回答1: Right now tensorflow does not have a build for python3.9 The latest one is for python3.8 You can check the build files at PyPI https://pypi

tf.GradientTape doesn't return gradients

倖福魔咒の 提交于 2021-02-05 08:12:32
问题 I'm using Tensorflow 2.1.0 with Python 3.7.7, in an Anaconda 3 environment running on Windows 7 64bits. This is my network: import tensorflow as tf from tensorflow import keras from tensorflow.python.keras.models import Model from tensorflow.python.keras.layers import Input, Dense, Conv2D, UpSampling2D, MaxPooling2D, Flatten, ZeroPadding2D from tensorflow.python.keras.optimizers import Adam def vgg16_encoder_decoder(input_size = (200,200,1)): ################################# # Encoder ######

python3 install of Tensorflow on Apple silicon M1

ぃ、小莉子 提交于 2021-02-05 08:00:06
问题 I have macOS Big Sur on a Apple Silicon M1 and I'm unable to install Tensorflow in python3. I removed xcode python3 and installed brew arm64 python3 (x86 python3 doesn't work as well) I checked successful 64 bis version python3 -c "import sys; print(sys.version)" or python -c "import struct; print(struct.calcsize('P')*8)" 3.8.7 (default, Dec 30 2020, 02:09:32) [Clang 12.0.0 (clang-1200.0.32.28)] Can this work anyhow, or who knows, how to make this work ? 回答1: Apple M1 is a processor with an

tensorflow2.0 isn't working with spyder with python 3.6

一个人想着一个人 提交于 2021-02-05 07:57:08
问题 I had installed anaconda3.5.2 which installs python 3.6.10. I then installed tensorflow2.0. After installation, from cmd console I get into python and import tensorflow as tf. I typed tf. version and all looks good. Then I launch spyder and do the same, the import does not give any errors, however tf. version says tf is not defined. I looked at sys.path and in both cases the paths are exactly the same. Appreciate any help and an answer. 回答1: This can sometimes be the case if we install