Questions tagged [tensorflow]

TensorFlow is an open source library for machine learning and machine intelligence. TensorFlow uses data flow graphs with tensors flowing along edges. For details, see https://www.tensorflow.org. TensorFlow is released under an Apache 2.0 License.

Filter by
Sorted by
Tagged with
0
votes
0answers
23 views

Neural Network Loss Function for Predicted Probability

I am building a neural network (using tensorflow/keras) that attempts to classify into one of 5 categories (0, 1, 2, 3, 4). I have been using ...
0
votes
2answers
55 views

How to cluster some text using TensorFlow

Apologies for any inaccuracies due to the infancy in this field. I'm trying to learn on how to return a dataset with three classes to be clustered by TensorFlow. At this stage, I've read a lot and ...
0
votes
0answers
4 views

classifying a part a robot makes from its power draw

I work for a company that has a robot that makes parts. I have a IOT device connected to the robot that measures and stores how much power the robot draws. The power data gives a clear pattern of when ...
1
vote
0answers
28 views

How to standardise/normalise csv data in a tensorflow 2 dataset

Does anyone know how to apply standardisation (or normalisation) on the numerical features of a dataset loaded in batch via tf.data.experimental.make_csv_dataset in ...
0
votes
0answers
12 views

Keras: Implementing paired Data Augmentation into Pix2Pix cGAN confusion

but learning GANs. Following a Jason Lee Brown tutorial (the code is his)... I am trying to add in Keras' ImageDataGenerator to the pix2pix algorithm. I can ...
2
votes
0answers
30 views

PyTorch equivalent of tf.Data

I've created a pipeline using tf.Data (or more accurately a mix of Pandas and then tf.Data). ...
1
vote
0answers
22 views

Negative loss, 100% accuracy

I have a very small dataset with 567 images. I've used pretrained model resnet50 in transfer learning. But whenever i fit my model it's giving me 100% accuracy , 100% validation accuracy and in per ...
0
votes
1answer
23 views

Keras Value Error

Not new to Python or programming but I'm fairly new to machine learning so I was hoping I'm just overlooking something simple. At the moment I keep running into an issue where Keras spits out the ...
1
vote
0answers
20 views

Question regarding TimeDistributed(conv1D) with kernel_size > 1

I am trying to understand how conv1D works in keras. If I try, ...
0
votes
0answers
66 views

Not able to deploy saved model into AWS Sagemaker

I am following this article https://machinelearningmastery.com/how-to-perform-object-detection-with-yolov3-in-keras/ to deploy YOLOv3 inside the AWS Sagemaker. I have the model.weights having weights ...
0
votes
0answers
23 views

Multivariate supervised LSTM for for regression only (not for prediction)

I am a beginner with machine learning. I want to get a multivariate regression model with LSTM. I followed this tutorial by Jason Brownlee: https://machinelearningmastery.com/multivariate-time-series-...
0
votes
1answer
18 views

Which approach is better?

In the book Deep Learning and Neural Networks by Michael Nielsen, he used a naive approach to write the code which is a bigger considered to a code written in tensorflow. I want to know which code is ...
0
votes
0answers
63 views

Custom layer in tensorflow which remembers input statistics

I would like to implement a layer which in a sense remembers what it's usual input is, and only passes on values that deviates from that. So basically, the layers need to remember the average of all ...
1
vote
0answers
12 views

Creating a RNN dataset and model for understanding context of a sports event

I'm working on a project which requires my code to understand what is happening at any instant in a video feed of a sports match. For example, take a football match. At a given moment, my code focuses ...
1
vote
0answers
59 views

Keras Error: An operation has `None` for gradient

Lets assume, that you want to build a GAN in keras. The generator transforms an image from ...
0
votes
0answers
23 views

Why does Keras' loss decreases very slow?

I'm training an LSTM with Keras. I notice that the loss value decreases, but very slowly. ...
0
votes
1answer
128 views

K-Fold Crossvalidation in Tensorflow when using flow_from_directory for image recognition

Disclaimer: I have very little experience with Tensorflow. I have a custom dataset with 20 categories with 100+ images in each. I am doing 5-fold cross validation using InceptionV3 for transfer ...
0
votes
0answers
24 views

Tensorflow object detection eval.py performing endless loop

I'm using tensor flow object detection API and while running the eval,py it load for few seconds then start this error and it repeats it like for ever INFO:tensorflow:Found already evaluated ...
2
votes
2answers
203 views

How to determine number of Neurons setup in Convolutional Neural Networks?

Im new to deep learning and still learning on how to train my neural networks from the scratch. Sometimes I watch tutorial on YouTube or even online courses on the MOOC platforms. The base of a ...
0
votes
0answers
18 views

How do I apply Min Max scaling for numerical forecast when both dependent and independent volumes are increasing over time?

I'm want to build a numerical regression to forecast. From my initial analysis, it shows linear models (glm) out performs the typical decision tree models (xgboost, ranger...etc). I hypothesized that ...
1
vote
2answers
56 views

Predict_proba for Binary classifier in Tensorflow

I'm working in binary classifier problem, where I have used Tensorflow low level API's. Last layer wrapped with Sigmoidal Function and just returning a single value. For my prediction I just set a ...
1
vote
1answer
31 views

Custom connections between layers Keras

I would like to manually define connections in neural network between layers using TensorFlow and keras with Python. By default connections are beween all pairs of neurons. I need to make connections ...
0
votes
1answer
19 views

Not able to restore attention model properly

I am referring this article on building an attention model using tensorflow. I am trying to train a similar model on my dataset using google colab. Due to the session limit of colab and my large ...
0
votes
0answers
16 views

What would be the output from tensorflow dense layer if we assign itself as input and output while making a neural network?

I have been going through the implementation of neural network in openAI code for any Vanilla Policy Gradient (As a matter of fact, this part is used nearly everywhere). The code looks something like ...
0
votes
0answers
30 views

How can I save this model(s) and why is the use for “with tf.Graph().as_default()”

I have been trying to train and then compile this RL algo. My problem comes when I want to save the three models. Here is how the neural networks are defined: ...
0
votes
0answers
23 views

Training a binary operator

I'm learning about neural networks and machine learning in general and wanted to perform a simple binary operator implementation in Tensorflow. I know implementing an operator is simple and is not a ...
1
vote
2answers
31 views

Clustering of unlabeled ship images

I want to create a ship detection classifier from a dataset that is formed by 4000 photos(3072*2048). But the dataset that i currently have is not labeled so i can feed it to a cnn.So i want to ...
0
votes
0answers
104 views

BERT classifier with Ktrain API is unable to predict new data

I have trained a classifier for sentiment analysis using BERT architecture. I am able to train the classifier and I am getting a validation accuracy of 87%. But whenever I feed in test data, or some ...
0
votes
0answers
19 views

Free dataset to train a neural network in order to extract text from image

I'm building a custom OCR to recognize and get text from png image. In order to dealing this task, i'm using python with tensorflow library (1.14.0) to develop a Convolutional Neural Network that ...
0
votes
0answers
13 views

Keras TimeDistributed wrapper Alternative

I have model in Tensorflow 2.0 keras. But I need to deploy this model to 32-bit windows project. I have tried opencv 4.3-dev 32-bit library for inference. But in a model I use ...
1
vote
1answer
219 views

tensorboard showing the epoch loss and accuracy for validation data but not training data

I am doing binary classification using CNN and viewing the results using tensorboard. The problem is that the tensorboard is not showing the loss and accuracy for training data. As seen curves for ...
0
votes
1answer
12 views

value of fit_generator parameters

I am doing simple CNN based binary image classification on classifying types of waste as organic and recyclable using image augmentation. How ever I have a doubt. In the third figure i have set the ...
1
vote
0answers
19 views

in tf_upgrade_v2 module, 'cp949' codec error comes out

I'm migrating my tensorflow v1 code to v2 code as follows tf_upgrade_v2 --infile Untitled1.ipynb --outfile tensorfoo-upgraded.py but ...
0
votes
0answers
19 views

How to get Euclidean Distance between feature maps

I'm trying to find "key frames" within a video using this paper however i'm a little new to machine learning and i'm stuck on the distance vector step. The goal is to calculate distance vector between ...
0
votes
1answer
23 views

Predictions of a Deep Learning Model

I’ve built a model that classifies digits from 0-9. My dataset is tf.keras.datasets.mnist. I use softmax as the activation function for the output layer. Q1: The output layer should consist of 10 ...
1
vote
0answers
58 views

setting class weights for imbalanced dataset in tensorflow [closed]

I have 24 classes in my dataset and I am trying to set class weights in the following way: ...
3
votes
5answers
679 views

Applying a keras model working with greyscale images to RGB images

I followed this basic classification TensorFlow tutorial using the Fashion MNIST dataset. The training set contains 60,000 28x28 pixels greyscale images, split into 10 classes (trouser, pullover, shoe,...
1
vote
0answers
9 views

Applying a keras model working with greyscale images to RGB images [duplicate]

I followed this basic classification TensorFlow tutorial using the Fashion MNIST dataset. The training set contains 60,000 28x28 pixels greyscale images, split into 10 classes (trouser, pullover, shoe,...
0
votes
0answers
16 views

DeepSpeech Speech-To-Text Time

I have been working with DeepSpeech for several weeks now (I have not successfully compiled the binaries to match my CPU instruction set so I get the error: "your CPU supports instructions that this ...
0
votes
1answer
148 views

What is a TensorSpec? (Tensorflow 2.0)

what is a tf.TensorSpec() and what is it used for?
0
votes
0answers
15 views

How to use a single GPU (vs. CPUs) in Tensorflow for forward inferencing (validation) vs. only for training

As mentioned in this question, it could be useful to harness a GPU vs. CPU(s) for validation. For example, in cross-validation, where the number of validation examples can exceed the number of ...
0
votes
0answers
18 views

How to create custom metrics for TensorBoard that don't use y_true and y_pred?

For my project I need to create a custom accuracy metric for my model, and visualize its progress on TensorBoard. The problem is that the formula for my custom accuracy depends on variables other than ...
1
vote
1answer
40 views

ValueError: Error when checking input: expected conv2d_25_input to have shape (144, 256, 3) but got array with shape (256, 144, 3)

I have built a CNN with images of size 720 (height) and 1280 (width). I attempt to re scale images to 144x256. However, I receive this error: ...
0
votes
1answer
43 views

Does save_best_only in Keras prevents overfitting?

I'm training a CNN and using: model_checkpoint = ModelCheckpoint(os.path.join(output_artifacts,'weights.h5'), monitor='val_acc', save_best_only=True) I trained ...
0
votes
2answers
96 views

Why apply a 50:50 train test split?

I am going through the "Text classification with TensorFlow Hub" tutorial. In this tutorial, a total of 50,000 IMDb reviews are split into 25,000 reviews for training and 25,000 reviews for testing. ...
1
vote
1answer
196 views

Val Accuracy not increasing at all even through training loss is decreasing

I am training a model for image classification, my training accuracy is increasing and training loss is also decreasing but validation accuracy remains constant. Here is my code: ...
0
votes
0answers
93 views

How to properly structure a train/validation input generator in Tensorflow 2.1

I'm struggling to understand why my generator does not work. I am working in Tensorflow 2.1 with Tensorflow Transform(tfx) created TFRecord shards. The below example works for my tf.estimator pipeline....
1
vote
1answer
59 views

TF Keras Text Processing - Classification Model

I'm trying to put together a script that classifies comments into either adequate or inadequate. I put a question up here earlier with all my code, but I think I've isolated the problem down into the ...
0
votes
0answers
17 views

Tensorflow data API: Building continuous streams of data from a Dataset of Datasets

I'm trying to build a language model with LSTMs (like ELMO). I've got a lot of documents and want to split them into words as input, but keep their order. So it should get all words of the first ...
0
votes
0answers
329 views

Getting TypeError: float() argument must be a string or a number, not 'list' Error

I am trying to run some code and I am getting a weird error, here is the code: ...

1 2 3
4
5
30