tensorflow

Tensorflow error - tensorflow.python.framework.errors_impl.NotFoundError - on running command rasa init --no-prompt

喜欢而已 提交于 2021-01-29 09:57:25
问题 When I run rasa init --no-prompt I am getting the above error. I am not able to debug the cause for this error, Above are the commands I have used to install Rasa. pip3 install rasa pip3 install --upgrade tensorflow rasa pip3 install --upgrade tensorflow-addons rasa pip install --upgrade pip pip3 install --upgrade tensorflow-addons rasa --use-feature=2020-resolver Above are my details of the versions used Rasa version: 1.10.10 Python version: 3.6.9 Operating system Ubuntu 18.04.4 64 bit

How to use smart reply custom ops in python or tfjs?

可紊 提交于 2021-01-29 09:49:17
问题 I'm trying to implement smart reply tflite model in python or tfjs, but they are using custom ops. Please refer https://github.com/tensorflow/examples/tree/master/lite/examples/smart_reply/android/app/libs/cc. So how to build that custom op separately and use that custom op in python or tfjs? 来源: https://stackoverflow.com/questions/59644961/how-to-use-smart-reply-custom-ops-in-python-or-tfjs

Why does python fail when loading data set “.load_data()”

我只是一个虾纸丫 提交于 2021-01-29 09:47:52
问题 here is my code import tensorflow as tf from tensorflow import keras import numpy as np import matplotlib.pyplot as plt data = keras.datasets.fashion_mnist (train_images, train_labels), (test_images, test_labels) = data.load_data() and it is giving me this long scary error: Downloading data from https://storage.googleapis.com/tensorflow/tf-keras-datasets/train-labels-idx1-ubyte.gz Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib

Apply different data augmentation to part of the train set based on the category

微笑、不失礼 提交于 2021-01-29 09:46:03
问题 I'm working on a machine learning process to classify images. My problem is that my dataset is imbalanced, and in my 5 categories of images, I have about 400 images in of one class, and about 20 images of each of the other classes. I would like to balance my train set by applying data augmentation only to certain classes of my train set. Here's the code I'm using for creating the train an validation sets: # Import data data_dir = pathlib.Path(r"C:\Train set") # Define train and validation

How to use many-to-one LSTM with variable-length input on Keras?

て烟熏妆下的殇ゞ 提交于 2021-01-29 09:33:58
问题 I have a multi-class sequence labeling problem where the number of time steps varies within samples. To use LSTM with variable-length input, I applied zero padding and masking to my input. I've read here that propagation of the mask stops after using LSTM layer with return_sequence=False parameter, that part confused me. My question is, would it be okay to use LSTM with return_sequence=False to calculate loss correctly for the below architecture ? from tensorflow.keras.layers import LSTM,

Train accuracy decreases with train loss

本秂侑毒 提交于 2021-01-29 09:32:54
问题 I wrote this very simple code model = keras.models.Sequential() model.add(layers.Dense(13000, input_dim=X_train.shape[1], activation='relu', trainable=False)) model.add(layers.Dense(1, input_dim=13000, activation='linear')) model.compile(loss="binary_crossentropy", optimizer='adam', metrics=["accuracy"]) model.fit(X_train, y_train, batch_size=X_train.shape[0], epochs=1000000, verbose=1) The data is MNIST but only for digits '0' and '1'. I have a very strange issue, where the loss is

Error after combination of two Keras models into VAE: You must feed a value for placeholder tensor 'critic_input_2'

只愿长相守 提交于 2021-01-29 09:30:17
问题 Trying combine GAN generator and critic to train both as VAE. Base code is here. Code modified to create encoder on top of critic: def _build_critic(self): #### THE critic critic_input = Input(shape=self.input_dim, name='critic_input') x = critic_input for i in range(self.n_layers_critic): x = Conv2D( filters = self.critic_conv_filters[i] , kernel_size = self.critic_conv_kernel_size[i] , strides = self.critic_conv_strides[i] , padding = 'same' , name = 'critic_conv_' + str(i) , kernel

Deploy function in AWS Lamda (package size exceeds)

╄→尐↘猪︶ㄣ 提交于 2021-01-29 09:28:32
问题 I am trying to deploy my function on AWS Lambda. I need the following packages for my code to function: keras-tensorflow Pillow scipy numpy pandas I tried installing using docker and uploading the zip file, but it exceeds the file size. Is there a get around for this? How to use these packages for my Lambda function? 回答1: publish your packages in AWS Lambda layer instead, and reference it from your code. The packages published in the AWS Lambda layer will be there all the time and will not

How to plot epoch vs. val_acc and epoch vs. val_loss graph in CNN?

混江龙づ霸主 提交于 2021-01-29 09:27:09
问题 I used a convolutional neural network (CNN) for training a dataset. Here I get epoch, val_loss, val_acc, total loss, training time, etc. as a history. If I want to calculate the average of accuracy, then how to access val_acc, and how to plot epoch vs. val_acc and epoch vs. val_loss graph? convnet = input_data(shape=[None, IMG_SIZE, IMG_SIZE, 3], name='input') convnet = conv_2d(convnet, 32, 3, activation='relu') convnet = max_pool_2d(convnet, 3) convnet = conv_2d(convnet, 64, 3, activation=

Unable to convert YOLOv4 to tflite

时间秒杀一切 提交于 2021-01-29 09:23:56
问题 I'm trying to use yolo4 in my android project but I'm having problems with conversion. The code from: https://pypi.org/project/yolov4/ has worked well on Google-Colab , though it had some problem with my CUDA version on Jupyter notebook. I got conversion error from: yolo.save_as_tflite("yolov4.tflite") Error was long and I am not sure which part I should paste here. Can someone recommend some alternative method to convert tflite version of yolo4 (preferably working on colab )? 回答1: If you