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
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
41 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
85 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
17 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
37 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
1answer
20 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
23 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
8 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
44 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
18 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
50 views

BERT 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 ...
0
votes
0answers
17 views

Why is the model not training without a Dense layer?

Experimenting with convolutional neural networks. As an educational task, I chose the stylization of the image. I use Keras with Tensorflow 2.1. Faced such a issue: if Dense layers are not used in CNN,...
2
votes
3answers
49 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
29 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
0answers
18 views

docker: invalid reference format. See 'docker run --help' [migrated]

I am trying to serving my model using TensorFlow with docker. I downloaded Docker for windows and tried the code as per the documentation. ...
0
votes
1answer
13 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
36 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
6 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
16 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
12 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
4 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
17 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 ...
0
votes
1answer
40 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
24 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
25 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
19 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
4 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
15 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
30 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.
0
votes
0answers
38 views

Problem with the hub.load function in tensorflow ( TypeError: Autotrack object is not callable)

I have a problem with loading pretrained module for an NLP task and the problem is because of the tf migration I suppose. Tensorflow website says that the problem might be sorted if the signature ...
0
votes
0answers
11 views

How to model predict on Tensorflow model that has feature columns?

So far all the coding examples using feature columns do not have examples of how to format their model.predict(...). I tried using raw string and also putting them ...
1
vote
2answers
35 views

Should the lambda for L1 norm regularizer inversely be proportional to the number of trainable weights?

Say I want to implement Conv2D in keras and for each Conv2D layer, if I apply 20 filters of [2,3] filter on an input with depth of 10, then there will be 20*(2*3*10+1) = 1220 trainable weights. the ...
-1
votes
1answer
77 views

What does from_logits=True do in SparseCategoricalcrossEntropy loss function?

In the documentation it has been mentioned that y_pred needs to be in the range of [-inf to inf] when from_logits=True. I truly ...
1
vote
1answer
12 views

How to go about creating embeddings (especially, token to Id mapping) for categorical columns in tensorflow 2.0+?

I have a csv with both categorical and float dtypes. I want to do the following: For each categorical column i will use pandas to compute the unique values (...
0
votes
0answers
12 views

BERT Implementaion for Sequence Classification

I am trying to implement BERT using HuggingFace - transformers implementation. I am following two links: by analytics-vidhya and by HuggingFace Below is the code: ...
0
votes
0answers
20 views

HuggingFace/Transformers Implementation for Classification

I am trying to implement BERT using HuggingFace - transformers implementation. I am following two links: by analytics-vidhya and by HuggingFace If we consider inputs for both the implementations: 1) ...
-2
votes
1answer
27 views

Can CNN do better than Transfer Learning?

With all my knowledge, I know that Transfer Learning do way better than CNN. I have a dataset of 855 images. I have applied CNN and got 94% accuracy.Then I applied Transfer Learning (VGG16, ResNet50, ...
0
votes
0answers
7 views

How to create a Tensorflow dataset for inferencing (not training) for fashion_mnist-trained model from an arbitrary input JPG/PNG image

OK so what I am trying to do is make a inference.py TensorFlow script that will load a saved model that has already been trained, take an input .jpg image, perform inferencing on it (on the existing ...
0
votes
0answers
13 views

How to determine the configuration of Conv2D layers?

I have this autoencoder with two parts:- encoder and decoder. However, I am having problem defining the configuration of these Conv2D layers. This is how my model look like:- input_img = Input(shape=(...
0
votes
0answers
63 views

Keras: Vector regression: ValueError:can not squeeze dim[1]

I'm trying to create a NLP model which takes x_train_padded_2 (padded/tokenized text sequences) as input and try to approximate ...
0
votes
1answer
24 views

How do I iterate over my images in dataset?

I am building an autoencoder with help from this site. There I was trying to build an autoencoder for my own custom data. My images are stored in a folder IMG and have names like ...
1
vote
0answers
23 views

Detect the presence/absense of simple components from a circuit board using object detection

In this case I have a challenge of inspecting a recently mounted product, using computer vision, to detect the absence of any component that I have to check. For this task, I tried the concept of ...

1
2
3 4 5
30