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
5 views

TensorFlow1.15, multi-GPU-1-machine, how to set batch_size?

The input function code: ...
0
votes
0answers
3 views

Neural network regression problem, integer output neuron constraint

The problem I'm solving is a regression problem using neural networks, and the "y" value covers a very large range (let's say y represents the number of people, ranging from 0 people to 10000 people), ...
0
votes
1answer
21 views

Training accuracy is ~97% but validation accuracy is stuck at ~40%

I am trying to classify images into 27 classes using a Conv2D network. The training accuracy rises through epochs as expected but the val_accuracy and val_loss values fluctuate severely and are not ...
0
votes
1answer
13 views

How to preprocess data for image classification from a .txt file?

Basically my issue is that im building an image classification model using AlexNet. I have this pre-split dataset thats already split into training, test, validation. However the issue is that these ...
0
votes
0answers
5 views

KerasClassifier.fit VS model.fit giving different results

I'm training a sample LTSM with keras / scikit-learn and I want to use the KerasClassifier wrapper, but it is giving me very odd results comparying it to a plain model.fit: ...
1
vote
1answer
21 views

How to tune learning rate with HParams Dashboard on Tensorflow?

In Tensorflow documentation, it is shown how to tune several hyperparameters but not the learning rate.I have searched how to tune learning rate using HParams dashboard but could not find much. The ...
0
votes
0answers
7 views

Tensorflow: tensorflow.python.framework.errors_impl.InvalidArgumentError

I came across an error while invoking the Tensorflow model: ...
0
votes
0answers
17 views

MNIST GAN generator loss increasing

I'm trying to train a simple vanilla GAN on MNIST with Tensorflow. I used this github page as a reference and in my process to try and get my GAN to work I've made my code more and more similar to ...
-1
votes
0answers
7 views

Training dice coefficient is increasing but validation dice coefficient remains constant at zero? [closed]

Epoch 1/100 442/442 - 31s - loss: 0.3007 - dice_coefficient: 0.4615 - val_loss: 1449.2620 - val_dice_coefficient: 0.0000e+00 Epoch 2/100 442/442 - 17s - loss: 0.1734 - dice_coefficient: 0.6617 - ...
0
votes
0answers
6 views

Sample Data Input Format for Tensorflow Saved Model

I'm new to tensorflow and I've served the saved model to Google AI Platform models. However, I am having issues with the format of sample input data. Can you please guide how should I format the data ...
0
votes
0answers
13 views

Is this Tensorflow 1.x network get trained?

I've just started to learn Tensorflow 2.1.0 with Keras 2.3.1 and Python 3.7.7. I have found the following code from this "Omniglot Character Set Classification Using Prototypical Network": ...
0
votes
0answers
11 views

Using Keras fit_generator for functional keras models and custom dataset

I have to fit a model that takes three discrete inputs and produces two discrete outputs using a generator made as follows: ...
0
votes
0answers
10 views

Error when trying to include class_weight in Keras

I need to use class_weight because my minority class is only 2% of the data set. Here is the code to create and run the model: ...
0
votes
0answers
9 views

Do we train a feature extractor or we just use a trained network as a feature extractor?

I've just started to learn Tensorflow and Keras. I'm using Tensorflow 2.1.0 and Keras 2.3.7. I'm using this network as a feature extractor. Well, I'm trying to use it: ...
0
votes
1answer
14 views

Generating Dinosaur names with Tensorflow RNN

I try to adapt "Text generation with an RNN" tutorial to generate new dinosaur names from a list of the existing ones. For training RNN tutorial text is divided into example character sequences of ...
2
votes
1answer
24 views

How to implement my own loss function for Prototype learning using Keras Model

I'm trying to migrate this code, "Omniglot Character Set Classification Using Prototypical Network", into Tensorflow 2.1.0 and Keras 2.3.1. My problem is about how to use euclidean distance between ...
0
votes
0answers
17 views

Keras ValueError: Input 0 of layer sequential_3 is incompatible with the layer: expected axis -1 [closed]

I am tying to implement deep learning in Keras, first I preprocess data: ...
0
votes
0answers
15 views

Calculating accuracy in Extractive Summarization

I am trying to implement a text summarization model. I am using keras tensorflow anad I have used bert sentence embeddings and the output of the embeddings are feeded into an LSTM and then to a Dense ...
0
votes
0answers
8 views

TF-Ranking transform data to ELWC - ExampleListWithContext

I have read all the guides, videos, and everything, but I have no idea how to convert my feature set to an ELWC datasheet format for TF-Rank ListWise problem. There is no description of this structure....
0
votes
1answer
22 views

How to make prediction using tensorflow models?

As a newbie to tensorflow, I am using this tutorial from google for binary classification using a simple dense neural network. The slightly annoying thing about this (and a few other) tutorials is ...
0
votes
2answers
37 views

Tensorflow keras fit - accuracy and loss both increasing drastically

ubuntu - 20.04 tensorflow 2.2 dataset used = MNIST I am testing tensorflow and i notice that validation sparse_categorical_accuracy (accuracy) and validation <...
0
votes
1answer
41 views

Is it possible to train stylegan2 with a custom dataset using a graphics card that only has 6GB of VRAM (GeForce GTX 1660)?

I'm attempting to train stylegan2 using a custom dataset, but no matter what settings I use I see the same error: ...
0
votes
0answers
9 views

Loss function for non-uniform distribution in pixel regression?

Goal: Given RGB images (x,y,3) and a grayscale heatmap (x,y,1), predict the heatmap using the RGB image as input to a neural network implemented inside Keras. Approach: Multiply heatmap by (1./255) ...
1
vote
1answer
24 views

How do I train a model with pre-saved weights?

I need to train a model but the data after preprocessing is too large to fit in the RAM. Is it possible to preprocess the data in batches and train a model for the small data set and then save the ...
1
vote
0answers
13 views

Tensorflow hub module taking long time for embedding single sentence

I am using universal sentence encoder from tensorflow hub to encode sentence into embedding. ...
-1
votes
0answers
5 views

ValueError: Error when checking target: expected dense_13 to have shape (1,) but got array with shape (10,)

I'm training on the CIFAR 10 Dataset on Jupyter Notebook Windows 10, and came across an error during training. Let me know what went wrong. My code is messy. Thank you! ...
0
votes
0answers
7 views

Question about a basic aspect of how text-2-speech spectrogram frames are aligned?

A key aspect of how text-to-speech (TTS) machine-learning works is very unclear to me even after reading the Tacotron-2 paper and the Google AI blog. https://ai.googleblog.com/2017/12/tacotron-2-...
0
votes
0answers
16 views

Understanding the implementation of domain adaptation algorithm

I'm trying to implement domain adaptation using stochastic neighborhood embedding based on this article. I have different input shapes in target and source domain and using 2 parallel CNNs for ...
-1
votes
0answers
22 views

No improvement of accuracy with neural network in transfer learning

I have created a binary classification, neural network model for my dataset (with 800000 entries) which comprises of malicious (with different attack types) and benign data traffic. I am looking to ...
0
votes
0answers
17 views

Custom output names for keras model

I have a model like this with multiple outputs and i want to change it's output names ...
0
votes
1answer
21 views

How to add a Decoder & Attention Layer to Bidirectional Encoder with tensorflow 2.0

I am a beginner in machine learning and I'm trying to create a spelling correction model that spell checks for a small amount of vocab (approximately 1000 phrases). Currently, I am refering to the ...
2
votes
1answer
30 views

What are the differences and advantages of TensorFlow and Octave for machine learning?

I have been exploring the different libraries and languages you can use in order to implement machine learning. During this, I have stumbled upon a library TensorFlow and Octave(a high-level ...
2
votes
1answer
21 views

How would you - on-the-fly - prevent a neural network from overfitting using a Keras callback?

I have a neural network that starts to overfit in that the validation loss begins to increase while the training loss stays ~ flat with epochs. Is there a generic algorithm - obvious or otherwise, ...
0
votes
1answer
30 views

running model.evaluate many times results different accuracy and loss value tensorflow 2

I have trained a CNN network using dataset = tf.data.Dataset.from_tensor_slices((data, label)) to create the dataset. training went well but evaluating the model on ...
1
vote
1answer
14 views

AWS SageMaker Model as endpoint size limit

Is there a size limit imposed on models deployed on AWS SageMaker as endpoints? I first tried to deploy a simple TensorFlow/Keras Iris classification model by converting to protobuf, tarring the model,...
0
votes
1answer
24 views

Fitting models to 2d data

I am reading the documentation on tf.lattice (https://www.tensorflow.org/lattice/overview) I am wondering how the training data was created/trained. Is it represented by (x,y) intpositions and some ...
1
vote
0answers
10 views

Intuition: why are ReLu activations boundary lines linear?

What is the reasoning behind ReLu boundary lines appearing linear when plotting in 2D? Does this generalize to higher dimensions in that boundary lines in large dimensions are linear hyperplanes as ...
0
votes
0answers
10 views

Epoch 1/5 won't stop

When i run my code with 5 epochs, code gets stuck at first epoch and run continuesly. I tried applying various parameters but couldn't make it. here is my code... ...
0
votes
0answers
5 views

keras how to subset input in Model

I have a data of the following format: ...
0
votes
1answer
17 views

Trainer Component Error in Tensorflow Extension : AttributeError: module 'user_module' has no attribute 'trainer_fn'

I want to build a tfx pipeline on own dataset. I could use some advice on the transform code that I wrote and understand better. I've done the ExampleGen, StatisticsGen, SchemaGen, ExampleValidator, ...
0
votes
0answers
23 views

EagerTensor object does not support item assignment

I'm trying to assign a new Value to a TF-Array. Here's my Code: import tensorflow as tf x = tf.zeros(shape=[5],dtype=tf.float32) x[1]=0 The error message: <...
1
vote
0answers
9 views

What's the best way to train a model when having a very big dataset split in batches?

I was wondering what is the best way to train my Keras Model, in a binary classification context. My full dataset is composed of 2.3M rows and 120 columns, which is really big. As you would imagine, ...
0
votes
0answers
3 views

Sequence Chunking: Shape Error

I'm making a sequence chunking project, similar to NER and sequence labeling. The inputs are sequences of words and the outputs are labels of "B-NP", "I-NP", and "O". Input: "The", "Merciful", "." ...
0
votes
0answers
21 views

Tensorflow 2.0 doesnt seem to be detecting my GPU, and runnning on CPU only

Today I tried to train a tensorflow model on my laptop and realized that it was taking way too long. I checked my system's processes and realized that my CPUs were being over-worked and my GPU wasn't ...
1
vote
1answer
21 views

Setting activation function to a leaky relu in a Sequential model

I'm doing a beginner's TensorFlow course, we are given a mini-project about predicting the MNIST data set (hand written digits) and we have to finish the code such that we get a 99% accuracy (measured ...
0
votes
1answer
19 views

How can I select data from a Tensorflow Dataset data collection?

Is there any way to select features or labels from a tensorflow Dataset without using numpy conversion methods or iterate through? The simplest example I found is: ...
0
votes
0answers
14 views

Implementing a custom layer in Tensorflow

I am trying to build a custom Compressed Interaction Network using TensorFlow since it is not available by default. The main idea of this layer is doing the following calculations: Where: $X^{0} ...
0
votes
2answers
19 views

How to Find the Average of the Input Vectors

I want to find the average of input vectors. I tried to use tf.math.reduce_mean, but it went error. If I have to use keras.layers.Average, I have to make a list of the hidden states. Does anyone ...
1
vote
0answers
19 views

Bias changes but weights do not - how to identify issue with the network?

Training on a small subset of images I am able to correctly predict road lanes in an image. I have been able to predict up to 1-2K images so far and struggled to work out why it could not predict on a ...
2
votes
2answers
40 views

Number of parameters in Resnet-50

I'm using Keras, and I am struggling to know how many parameters Resnet-50 has. Keras documentation says around 25M, while if I ...

1
2 3 4 5
29