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
1answer
52 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
37 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
38 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
17 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
25 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
13 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
11 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
11 views

keras how to subset input in Model

I have a data of the following format: ...
0
votes
1answer
19 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, ...
1
vote
2answers
107 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
10 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
29 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
45 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
15 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
20 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
46 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
vote
2answers
108 views

What are advantages or disadvantages of training deep learning model from scratch? [closed]

I want to know advantages and disadvantages.Also, What are advantages and disadvantages of transfer leraning?
0
votes
1answer
18 views

Should I Plot my Learning Curve Depending on Various Parameters to Diagnose Overfitting/Underfitting or is One Parameter Sufficient?

I know that learning curves are a good tool to diagnose overfitting or underfitting for a model. Their working principle is simple: The training/validation loss/accuracy is plotted depending on ...
0
votes
1answer
40 views

Error when checking target: expected Output to have 2 dimensions, but got array with shape (631, 80, 2641)

I'm making a Text Chunking program using Bi-LSTM from the model I of the paper "Neural Models for Sequence Chunking". The inputs are sequences of words and the outputs are "B-NP", "I-NP", and "O". ...
0
votes
2answers
36 views

Loss of NAN, Accuracy of 0 - Any idea why? Full code provided

I've been on this for the past few days and couldn't figure it out. Posted on various groups, StackOverflow etc and got suggestions from many users. I implemented these suggestions into the code shown ...
0
votes
1answer
6 views

Can I add categories to a dataset after and retrain an H5 file? Without retraining the previous ones?

This is the situation. I'm training a model to recognize letters of the Alphabet. There are 26 classes. When writing the code for 26 classes, and loading nearly 100,000 images to train, I'm having a ...
1
vote
0answers
25 views

class activation mapping when accuracy is 100%

I am a beginner to image classification and apologies beforehand if the question I am asking is dumb. I am currently using the following model: ...
0
votes
0answers
10 views

AI architecture for time and spacial sequences

I am working on a project where I analyse MEG data. I have 102 channels as a vector and a 2D matrix of the channels (11x14) to show spatial relations - I want to include that in the AI architecture. ...
1
vote
0answers
47 views

Gender Prediction from Offline Handwriting Using Convolutional Neural Networks

Starting from the fact that handwritten documents style are gender-dependent (male and female have different writing styles), I'm trying to predict writer's gender from its handwritten scripts using ...
0
votes
1answer
23 views

TensorFlow Time Series Tutorial Enhancement Gone Wrong

I’ve been following this time series tutorial for Tensorflow… https://www.tensorflow.org/tutorials/structured_data/time_series And it was going good, and seemed to work ok. I substituted with my ...
0
votes
1answer
119 views

Implementation of BERT using Tensorflow vs PyTorch

BERT is an NLP model developed by Google. The original BERT model is built by Tensorflow team there is also a version of BERT which is built using PyTorch. What is the main difference between these ...
2
votes
3answers
50 views

Does this mean underfitting?

I am training model to classify fruit images belonging to 60 classes. I have this result: Validation accuracy is greater than training accuracy. Does this mean underfitting? If yes, can I fix this by ...
0
votes
1answer
30 views

Implementing the SVHN CNN architecture in Srivastava et al. 2014 Dropout paper

I am trying the implement the CNN architecture introduced in Srivastava et al. 2014 Dropout paper (appendix B.2), for the SVHN dataset. I implemented only the convolutional layers part, without ...
0
votes
1answer
19 views

Should I put time on my Vanilla ANN for classifying MNIST Dataset

I am building a Vanilla Neural Network in Python for my Final Year project, just using Numpy and Matplotlib, to classify the MNIST dataset. Here's the specifications of the model: One Input Layer + ...
0
votes
1answer
39 views

how to shuffle the data for model.fit with custom data generator?

So trainfiles is a list that contains the files' directory and name e.g. ['../train/1.npy' , '../train/2.npy'] and then I create a dataset as shown in the middle of the code then I apply it to model ...
0
votes
0answers
5 views

Time Series Prediction in Tensorflow where the first data point is different from the following

I've implemented a time series prediction using an LSTM network in Tensorflow. Right now, the input at each timestep is the same. However, the intial time has some data available that later times do ...
0
votes
0answers
7 views

tensorflow feature columns

I am a beginner in TensorFlow. So while going through an article I came across tf.feature_columns being used. I understand the general use of it,but what I am confused about something.There were some ...
0
votes
0answers
8 views

Evaluating A Model Trained using Custom Training like Gradient Tape

using Tensorflow 2 I trained a Convolution Model using a custom training loop (Gradient Tape) ...
0
votes
1answer
20 views

Loss function returns x whereas tensorflow shows validation loss as (x+0.0567)

I have a custom loss function. In order to experiement how the loss is calculated during valiation, I update the loss function as follows: ...
0
votes
0answers
9 views

LSTM Keras sorting out the X and y input dimensions

I am trying to build an LSTM and am confused about the best way to shape my data. I have a dataframe that looks like this: df.head(5) ...
0
votes
1answer
14 views

Sequentially Training Certain Layers/Sub-Networks in Keras Functional API

Suppose we have a stacked neural network architecture with a layer that is to be shared between two "sub-networks". Example: ...
0
votes
0answers
5 views

Output of evaluate_generator is non-deterministic across fresh runs

I'm running a test script in Keras, which calls evaluate_generator and exits. The network in use is InceptionV3. I notice that ...
1
vote
1answer
23 views

Tensor Mean of values greater than a threshold

I have a tensor of shape = [a,b,c] The tensor mean along dim=1 will give me an output of shape = [a,c] My goal is to compute the mean of values along dim=1 greater than a threshold. How is this ...
1
vote
2answers
68 views

How to improve accuracy in the following code?

I have the about 43 different categories of traffic signs images data. If I am using the small data of 3 categories the maximum accuracy I am getting is around 65% and I have tried a lot of different ...
0
votes
0answers
22 views

How to improve accuracy in the following code? [duplicate]

I have the about 43 different categories of traffic signs images data. If I am using the small data of 3 categores the maxiumum accuracy I am getting is around 65% and I have tried a lot of different ...
0
votes
1answer
25 views

Why is my model accuracy decreasing after the second epoch?

This is my training log for ten epoch for a sentiment analysis model: ...
0
votes
0answers
26 views

Text classification (question to fixed answer)

I am trying to solve a NLP classification problem (simple chatbot) with a small dataset: 1500 questions with around 300 answers. I have obtained good results using a "character level encoding" ...
0
votes
1answer
21 views

Tensorflow 2.0 - Layer with fixed input

I'm trying to use Tensorflow to optimize a few variables to be used in a KNN algorithm, however, I'm running into an issue where I'm unable to have a layer work properly if it is not connected to an <...
0
votes
0answers
6 views

Benchmarking VOC12 on Tensorflow, Keras, PyTorch, Theano, MXNet and Chainer

I want to assess performance(time, resource utilization etc) of the DL Frameworks(Keras, Tf,etc.) on the Pascal VOC 12 dataset? Are there relevant implementation available or should I be writing down ...
1
vote
0answers
16 views

How to apply the Fourier or Wavelet transformed data to LSTM model

I am dealing with a PHM RUL problem, a time series problem of machine signal. I consider to apply Fourier transform or Wavelet Transform to my sensor feature and train the LSTM model. But I have some ...
1
vote
2answers
35 views

A Machine learning model that has a undefined input size but a fixed output?

I don't know too much about ML but I can seem to figure out how to train something like this. If you guys could list some possible ways to do this, thank you.

1 2
3
4 5
30