tensorflow

Finetuning VGG-16 on GPU in Keras: memory consumption

血红的双手。 提交于 2021-02-08 11:20:20
问题 I'm fine-tuning VGG-16 for my task. The idea is that I load the pretrained weights, remove the last layer (which is softmax with 1000 outputs) and replace it with a softmax with a few outputs. Then I freeze all the layers but the last and train the model. Here is the code that builds the original model and loads the weights. def VGG_16(weights_path=None): model = Sequential() model.add(ZeroPadding2D((1,1),input_shape=(224,224,3))) model.add(Conv2D(64, (3, 3), activation='relu')) model.add

Execution failed for task ':packageDebug' - in buildozer

僤鯓⒐⒋嵵緔 提交于 2021-02-08 11:15:45
问题 I'm having an error when, I tried to create an .apk file using buildozer. I have put tensorflow, keras, numpy in requirements (.spec file). However when I try to compile I receive this error: [DEBUG]: Unable to strip library '1' due to error /home/.../.buildozer/android/platform/android- ndk-r19c/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm- linux-androideabi-strip returned from '/home/.../Desktop/Sign/.buildozer/android/platform/build- armeabi- v7a/dists/signapp_

Execution failed for task ':packageDebug' - in buildozer

℡╲_俬逩灬. 提交于 2021-02-08 11:14:22
问题 I'm having an error when, I tried to create an .apk file using buildozer. I have put tensorflow, keras, numpy in requirements (.spec file). However when I try to compile I receive this error: [DEBUG]: Unable to strip library '1' due to error /home/.../.buildozer/android/platform/android- ndk-r19c/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm- linux-androideabi-strip returned from '/home/.../Desktop/Sign/.buildozer/android/platform/build- armeabi- v7a/dists/signapp_

Keras hyperparameter autotune shortening the path

被刻印的时光 ゝ 提交于 2021-02-08 11:12:58
问题 this is the code that I am running. It is a self hyperparameter tuned ANN. The path is to long and I don't know how to shorten it. def build_model(hp): model = keras.Sequential() for i in range(hp.Int('num_layers', 2, 20)): model.add(layers.Dense(units=hp.Int('units_' + str(i), min_value=32, max_value=512, step=32), activation='relu')) model.add(layers.Dense(1, activation='linear')) model.compile( optimizer=keras.optimizers.Adam( hp.Choice('learning_rate', [1e-2, 1e-3, 1e-4])), loss='mean

Keras hyperparameter autotune shortening the path

爷,独闯天下 提交于 2021-02-08 11:12:49
问题 this is the code that I am running. It is a self hyperparameter tuned ANN. The path is to long and I don't know how to shorten it. def build_model(hp): model = keras.Sequential() for i in range(hp.Int('num_layers', 2, 20)): model.add(layers.Dense(units=hp.Int('units_' + str(i), min_value=32, max_value=512, step=32), activation='relu')) model.add(layers.Dense(1, activation='linear')) model.compile( optimizer=keras.optimizers.Adam( hp.Choice('learning_rate', [1e-2, 1e-3, 1e-4])), loss='mean

Could not import PIL.Image even if Pillow already installed?

冷暖自知 提交于 2021-02-08 11:12:01
问题 I'm going through chapter 5 of the book Deep Learning with R (https://livebook.manning.com/book/deep-learning-with-r/chapter-5/112). When running the code below, the following error appears: Error in py_iter_next(it, completed) : ImportError: Could not import PIL.Image. The use of load_img requires PIL. All answers with regard to this error message recommend using pip install pillow . When I run this in my Terminal, the following appears: Requirement already satisfied: pillow in /anaconda3

Could not import PIL.Image even if Pillow already installed?

旧巷老猫 提交于 2021-02-08 11:11:35
问题 I'm going through chapter 5 of the book Deep Learning with R (https://livebook.manning.com/book/deep-learning-with-r/chapter-5/112). When running the code below, the following error appears: Error in py_iter_next(it, completed) : ImportError: Could not import PIL.Image. The use of load_img requires PIL. All answers with regard to this error message recommend using pip install pillow . When I run this in my Terminal, the following appears: Requirement already satisfied: pillow in /anaconda3

Could not import PIL.Image even if Pillow already installed?

我与影子孤独终老i 提交于 2021-02-08 11:10:59
问题 I'm going through chapter 5 of the book Deep Learning with R (https://livebook.manning.com/book/deep-learning-with-r/chapter-5/112). When running the code below, the following error appears: Error in py_iter_next(it, completed) : ImportError: Could not import PIL.Image. The use of load_img requires PIL. All answers with regard to this error message recommend using pip install pillow . When I run this in my Terminal, the following appears: Requirement already satisfied: pillow in /anaconda3

Could not import PIL.Image even if Pillow already installed?

笑着哭i 提交于 2021-02-08 11:06:17
问题 I'm going through chapter 5 of the book Deep Learning with R (https://livebook.manning.com/book/deep-learning-with-r/chapter-5/112). When running the code below, the following error appears: Error in py_iter_next(it, completed) : ImportError: Could not import PIL.Image. The use of load_img requires PIL. All answers with regard to this error message recommend using pip install pillow . When I run this in my Terminal, the following appears: Requirement already satisfied: pillow in /anaconda3

tensorflow lite(tflite) invoke error after resize the input dimension

一世执手 提交于 2021-02-08 10:46:42
问题 I am using mobilenet_ssd.tflite as the mode from the official tensorflow github. Code below: int input = interpreter->inputs()[0]; interpreter->ResizeInputTensor(input, sizes); This will cause error when calling : interpreter->AllocateTensors() If I comment out the interpreter->ResizeInputTensor(input, sizes); Then every thing is fine. Any suggestions? Another question that I asked: change the input image size for mobilenet_ssd using tensorflow 回答1: ResizeInputTensor is restricted by the