Issue Good morning everyone; I’m trying to implement this model where the neural network’s inputs are based on a trainable vocabulary matrix (each row in the matrix represents a word entry in the vocabulary). I’m using keras (tensorflow backend), I
Continue readingTag: tensorflow
ValueError: Cannot feed value of shape (128, 28, 28) for Tensor 'Placeholder:0', which has shape '(?, 784)'
Issue I am new to Tensorflow and Machine Learning and trying out CNN using Tensorflow with my custom input data. But I am getting the error attached below. The Data or Image Size is 28×28 with 15 Labels. I am
Continue readingTensorflow: create minibatch from numpy array > 2 GB
Issue I am trying to feed minibatches of numpy arrays to my model, but I’m stuck with batching. Using ‘tf.train.shuffle_batch’ raises an error because the ‘images’ array is larger than 2 GB. I tried to go around it and create
Continue readingCouldn't Train Tensor Object Detection API Models
Issue I am using tensorflow’s object detection API. I successfully trained with ‘ssd_mobilenet_v1_coco_2017_11_17’ model, later I moved to another model from the given models but while training process starts it showing the error: “TypeError: Expected int32, got range <0,3> of
Continue readingTensorflow (steps, batch_size and periods)
Issue I am a little confused while training a model in tensorflow. What are steps and batch_size and periods in the train_model function? The code for the train_model function is given in the link to Learn from google AI Solution
Continue readingTensorFlow Object Detection API trains only one class instead of multiple classes
Issue I have been trying to fine-tune the SSD Inception v2 model with my own dataset of different kinds of drinks. Unfortunately, when I am training, I found that only one category of class is getting trained but not the
Continue readingTrain Mobilnet V2 with transfer learning in Tensorflow
Issue Folks, How can I do transfer/domain learning with mobilenet v2? I use the mobilnet v1 training code to train mobilenet v1, but is there written code to train v2 either in the models repository, or in the tensorflow repository?
Continue readingTfrecord vs TF.image?
Issue I was under the impression that having a pre-computed Tfrecord file was the most efficient way to feed your input function. However, I keep seeing great looking articles such as this one where the input function takes a reference
Continue readingGrayscale input image for SSD detector in Tensorflow Detection API
Issue I’m creating a dataset of images to train a detector using Tensoflow Detection API (SSD/MobileNet). Images are grayscale but it seems the input should be RGB image. Do I need to convert grayscale images to a three channel RGB
Continue readingHow to connect the output tensor of a restored graph to the input of the default graph in tensorflow?
Issue I am new to tensorflow, and I have been stuck at this for several days. Now I have the following pretrained model (4 files): Classification.inception.model-27.data-0000-pf=00001 Classification.inception.model-27.index Classification.inception.model-27.meta checkpoint And I can successfully restore this model as a default graph
Continue readingTrain Tensorflow with my own images successfully, but still have problems
Issue I am using ubuntu 16.04, with GPU Geforce 1080, 8 GB GPU memory. I have properly created TF-record files, and I trained the model successfully. However I still have two problems. I did the following steps and I still
Continue readingCannot Train Keras Pre-trained Model in Tensorflow Estimator
Issue While implementing a Tensorflow keras VGG16 pre-trained model with custom data using the Estimator class, it is throwing the error “ValueError: Cannot find input with name “image” in Keras Model. It needs to match one of the following: input_30“.
Continue readingBfloat16 training in GPUs
Issue Hi I am trying to train a model using the new bfloat16 datatype variables. I know this is supported in Google TPUs. I was wondering if anyone has tried training using GPUs (for example, GTX 1080 Ti). Is that
Continue readingHow does GradientDescentOptimizer.minimize() work?
Issue In regard to TensorFlow, I am confused with how GradientDescentOptimizer.minimize() actually works. To be more specific through the code below, how does calling minimize(error) modify the m, b so that when I just call sess.run([m, b]), they return the
Continue readingTensorboard bump in accuracy score
Issue I have been training my Inception ResNet V2 using Tensorflow, and logging the accuracy/loss etc. via TensorBoard. Now when I resumed training today, almost instantly (in a few global steps) my accuracy bumped from 86% to 97%, when resuming
Continue readingAvoiding overfitting while training a neural network with Tensorflow
Issue I am training a neural network using Tensorflow’s object detetction API to detect cars. I used the following youtube video to learn and execute the process. https://www.youtube.com/watch?v=srPndLNMMpk&t=65s Part 1 to 6 of his series. Now in his video, he
Continue readingTensorFlow ValueError: Cannot feed value of shape (32, 2) for Tensor 'InputData/X:0', which has shape '(?, 100)'
Issue I am new to TensorFlow and machine learning. I’m trying to create a sentiment analysis NN with tensorflow. I’ve set up my architecture and I’m attempting to train the model but I encounter the error ValueError: Cannot feed value
Continue readingPickle loading CIFAR-100 data
Issue I am trying to unpickle the CIFAR-100 data, but I do not think I am doing it correctly. From their example, you load the file and then call pickle.load(): #imports data def unpickle(file): import pickle with open(file, ‘rb’) as
Continue readingexpected ndim = 4 found ndim = 5 and other errors – Keras – GTSRB dataset
Issue I’m trying to make a CNN model based on the GTSRB dataset (link given below), but I’m faced with the following error: When I set the input_shape = input_shape=(3, IMG_SIZE, IMG_SIZE), I get this error: ValueError: Error when checking
Continue readingDoes TensorFlow optimizer minimize API implemented mini-batch?
Issue Does Tensorflow minimize API for, say GradientDescentOptimizer implement mini-batch already when we feed the input tensor with a minibatch size of data? I was reading this bolg which indicated that the minibatch is not implemented in the minimize method,
Continue readingSimultaneous training and testing in Tensorflow
Issue I am trying to perform training and testing of a neural network in Tensorflow in the same script, same graph, same session. I read that it is possible, however when I look at the accuracy/loss results from the training
Continue readingTraining Huge Data with CNN
Issue As a newbie in machine learning, I have tried to search for a lot of methods used for training classifier and how to make data readable. All I know till now that labels are the most important thing for
Continue readinghow to configure data labels in a numpy array for training a Keras model?
Issue I’m trying to implement Keras for my first time (so sorry for the dumb question) as part of a wider project to make an AI that learns to play connect 4. As part of this, I pass a NN
Continue readingHow to fix TensorFlow Linear Regression no change in MSE?
Issue I’m working on a simple linear regression model to predict the next step in a series. I’m giving it x/y coordinate data and I want the regressor to predict where the next point on the plot will lie. I’m
Continue readingTraining, Validation, Testing Batch Size Ratio
Issue I’m doing transfer learning using Inception on Tensorflow, this is the training code that I followed : https://raw.githubusercontent.com/tensorflow/hub/master/examples/image_retraining/retrain.py At the bottom part of the code, we can specify the parameters according to our dataset. (there are training, val, test
Continue readingSame Keras model got different result between Ubuntu and windows?
Issue I want to use my linux computer to train the model. I directly load the pre-training model in windows, but the loss get higher and the accuracy declined. this is my training model def create_model(self): print(“CREATE NEW MODEL”) input_img
Continue readingHow to retrain mobilenet model for custom images
Issue I have followed tensorflow for poets tutorial and got a basic understanding of how to retrain a model for custom objects. In the tutorial, I retrained the model for different categories of flowers and then used the newly generated
Continue readingTraining set contains "labels" as inputs to keras model
Issue I’m seeing that my keras model does not handle input columns well if they are not float values. I’d like to be able to train the model using columns that contain “labels”, and by labels I mean IDs of
Continue readingMultiple labels on a single bounding box for tensorflow SSD mobilenet
Issue I have configured SSD mobilenet v1 and have trained the model previously as well. However in my dataset for each of the bounding box there are multiple class labels. My dataset is of faces each face have 2 labels:
Continue readingRetrain object detection model with own images (tensorflow)
Issue Good morning, I have been working with the tensorflow object detection tutorial using the ssd_mobilenet they are providing as a frozen graph as well as with the corresponding checkpoint files (model.ckpt.data-00000-of-00001, model.ckpt.index, model.ckpt.meta). However, as the images are sometimes
Continue readingHow to inspect the structure of a TFRecord file in TensorFlow 1.13?
Issue I am rather confused by the TFRecord file format, and how to use it. I have a TFRecord, but have little idea as to what it exactly contains and what its structure is. How can I print and inspect
Continue readingThe first layer's weights don't change after training when using Keras
Issue Some people discussed this issue before, but they generally converge to gradient vanishing as the root for this issue. But in my model, there is only two hidden layers which is unlikely stuck on gradient vanishing, as shown below:
Continue readingTensorFlow how do the new contrib.data.Dataset objects work?
Issue In TensorFlow, the old input pipeline used a series of queues, and threads enqueueing and dequeueing elements from those queues. For example, the string_input_producer queue for file names, tf.train.batch as a queue for batching, etc. Consequently before training, you
Continue readingTensorflow trained model speed
Issue I’m a Tensorflow newby and I’m trying to train a 1 class model for object detection. In particular I’m trying to recognize an arrow like the following: I need a very fast recognition so I started wondering if a
Continue readingValueError: Error when checking input: expected conv2d_36_input to have shape (3, 32, 32) but got array with shape (1, 10, 10)
Issue When I try to run my training model the error comes what should I do to pass the error report? Is there any problem with my model or my reshape part? This is my reshape part # Reshape and
Continue readingTraining Chip and Target Image format in TensorFlow
Issue I am trying to build a Land Cover Classification model for Sentinel Image. The Image Channels(bands) I am using are 32-bit float. I need to understand how to best format the Image data, both the chips/patches for training and
Continue readingRepeating images in training dataset for tensorflow object detection models
Issue I’m training a tensorflow object detection model which has been pre-trained using COCO to recognize a single type/class of objects. Some images in my dataset have multiple instances of such objects in them. Given that every record used in
Continue readingImport Error: Cannot Import name input_reader_pb2
Issue I am using Tensorflow Object Detection API to train my object detection model. I accumulated the dataset, and am going through the this tutorial. Everything went fine until I tried to train my dataset. When I run the following
Continue readingKeras image similarity model trouble with labels
Issue I am working on a deep image similarity model and I would like to get some help on it. I keep getting this error and don’t know what to exactly do with it or how to fix it. Input
Continue readingtensorflow: batches of variable-sized images
Issue When one passes to tf.train.batch, it looks like the shape of the element has to be strictly defined, else it would complain that All shapes must be fully defined if there exist Tensors with shape Dimension(None). How, then, does
Continue readingTensorflow Object Detection Training Killed, Resource starvation?
Issue This question has partially been asked here and here with no follow-ups, so maybe this is not the venue to ask this question, but I’ve figured out a little more information that I’m hoping might get an answer to
Continue readingTake output of intermediate layer as input for model training
Issue Usually we feed a model for training with external data. But I would like to use tensor coming from intermediate layer of the same model as an input for next batch. I believe that this can be acheived by
Continue readingWhy is my validation loss lower than my training loss?
Issue Why is my validation loss lower than my training loss? I wonder if those curves are acceptable. I don’t know if those curves are true or not. Solution This case will rarely happen in a real-world dataset, however, it
Continue readinghow to split data into training and testing
Issue I got this dataset which is composed of images and their labels. I load them using a custom function that I’ve written. The problem where I stumbled upon is that I don’t know how to appropriately split them in
Continue readinghow important is the loss difference between training and validation data at the beginning when training a neuronal network?
Issue Short question: Is the difference between validation and training loss at the beginning of the training (first epochs) a good indicator for the amount of data that should be used? E.g would it be a good method to increase
Continue readinghow to read .hdf5 datafile as input to a convolutional neural network?
Issue I have saved my large array of images and their labels in HDF5 format using this link: Saving and loading a large number of images (data) into a single HDF5 file which gives me following keys. list of datasets:
Continue readingParallelize data preparation with tensorflow and keras
Issue I’m training an LSTM model on GPU using Tensorflow Keras. Before training starts when calling model.fit() it takes about 30 minutes to start training process. I think in this period its preparing data using one core of CPU. Am
Continue readingAssertion Error while training on last epoch
Issue I have used a model from this repo. I want to train it again to improve performance. This is my training command. !python train.py –snapshot efficientdet-d0.h5 –phi 0 –gpu 0 –weighted-bifpn –random-transform –compute-val-loss –freeze-bn –batch-size 4 –steps 100 coco
Continue readingIs it possible to resume training from a checkpoint model in Tensorflow?
Issue I am doing auto segmentation and I was training a model over the weekend and the power went out. I had trained my model for 50+ hours and saved my model every 5 epochs using the line: model_checkpoint =
Continue readingCan neural networks handle redundant inputs?
Issue I have a fully connected neural network with the following number of neurons in each layer [4, 20, 20, 20, …, 1]. I am using TensorFlow and the 4 real-valued inputs correspond to a particular point in space and
Continue readingValueError: Layer #232 (named "fpn_cells/cell_0/fnode0/add") expects 0 weight(s) , but the saved weights have 1 element(s)
Issue I’ve been trying to train dataset using python train.py –snapshot efficientdet-d0.h5 –phi 0 –gpu 0 –random-transform –compute-val-loss –freeze-backbone –batch-size 4 –steps 100 coco C:/Users/mustafa/Downloads/deneme.v1-1.coco/datasets/coco And I’ve seen this error. Traceback (most recent call last): File “train.py”, line 381, in
Continue readingTensorflow doesn't train: 'DataFrame' objects are mutable, thus they cannot be hashed
Issue I want to build and train a neural network with tensorflow (but without Keras, on Keras it I got it working) on the kaggle dataset ‘House Prices’. I use Python and apart from the actual training, my code runs
Continue readingTensorflow Keras Shape mismatch
Issue While trying to implement a standard MNIST digit recognizer that many tutorials use to introduce you to neural networks, I’m encountering the error ValueError: Shape mismatch: The shape of labels (received (1,)) should equal the shape of logits except
Continue readingI got this error when training gru model TypeError: unsupported operand type(s) for *: 'int' and 'NoneType'
Issue code from Hands on Machine Learning with Scikit Learn Keras and TensorFlow 2nd Edition-2019 import tensorflow as tf from tensorflow import keras from __future__ import print_function from keras.callbacks import LambdaCallback from keras.models import Sequential from keras.layers import Dense from
Continue readingKeras ImageDataGenerator validation split not selected from shuffled dataset
Issue How can I randomly split my image dataset into training and validation datesets? More specifically, the validation_split argument in Keras ImageDataGenerator function is not randomly splitting my images into training and validation but is slicing the validation sample from
Continue readingImportError: cannot import name 'device_spec' from 'tensorflow.python.framework'
Issue When i try to run python train.py –logtostderr –train_dir=training/ –pipeline_config_path=training/faster_rcnn_inception_v2_pets.config command this error pops out. (tensorflow1.13) C:\tensorflow1\models\research\object_detection>python train.py –logtostderr –train_dir=training/ –pipeline_config_path=training/faster_rcnn_inception_v2_pets.config Traceback (most recent call last): File "train.py", line 51, in from object_detection.builders import dataset_builder File "C:\tensorflow1\models\research\object_detection\builders\dataset_builder.py", line 33,
Continue readingMemory error while training my model: Unable to allocate 31.9 GiB for an array with shape (3094, 720, 1280, 3) and data type float32
Issue So, I am providing labels to my images as "0" and "1" based on the presence of a human. When I pass all my images and try to train my model. I get a memory error. import warnings warnings.filterwarnings(‘ignore’)
Continue readingTrain an image classification model using Tesnsorflow
Issue what image classification to use for training? we want to train a model with our own pictures for a school project. Can I use resnet50 or any other trainable model? I couldn’t find Resnet50 trainable model and I found
Continue readingAttribute Error: 'List' object has no attribute 'shape' . Error while trying to train the model with multiple features( multiple arrays)
Issue I have two arrays "train_vol" and "train_time" with shape (164,6790) and one array "train_cap" with shape(164,1). I want to train the model like this… inputs–> train_vol and train_time output–> train_cap …..validation inputs –> val_vol,val_time and validation output –> val_cap….shape
Continue readingWeird behaviour for my CNN validation accuracy and loss function during training phase
Issue Here is the architecture of my network : cnn3 = Sequential() cnn3.add(Conv2D(32, kernel_size=(3, 3), activation=’relu’, input_shape=input_shape)) cnn3.add(MaxPooling2D((2, 2))) cnn3.add(Dropout(0.25)) cnn3.add(Conv2D(64, kernel_size=(3, 3), activation=’relu’)) cnn3.add(MaxPooling2D(pool_size=(2, 2))) cnn3.add(Dropout(0.25)) cnn3.add(Conv2D(128, kernel_size=(3, 3), activation=’relu’)) cnn3.add(Dropout(0.2)) cnn3.add(Flatten()) cnn3.add(Dense(128, activation=’relu’)) cnn3.add(Dropout(0.4)) # 0.3 cnn3.add(Dense(4, activation=’softmax’))
Continue readingSplit tensor into training and test sets
Issue Let’s say I’ve read in a textfile using a TextLineReader. Is there some way to split this into train and test sets in Tensorflow? Something like: def read_my_file_format(filename_queue): reader = tf.TextLineReader() key, record_string = reader.read(filename_queue) raw_features, label = tf.decode_csv(record_string)
Continue readingmodule 'tensorflow' has no attribute 'set_random_seed' for RASA NLU supervised embeddings pipeline trainer
Issue So I’m trying to train my data using supervised embeddings pipeline. Rasa version: 1.10.12 Tensorflow version: 2.1.1 Rasa NLU: 0.15.1 config.yml contains this: language: “en” pipeline: “supervised_embeddings” I’m running this on a notebook, but I keep on getting an
Continue readingWhy Trained and Loaded Model is giving different evaluate result? 82% vs 5%
Issue I implemented my seq-Keras model and it was successfully trained. … model.fit(…) … >>Result: Successfully completed: TrainAcc=99%, ValAcc=88% Next: NOW I run this code: model.save(‘Model88.h5’) model.evaluate(X_test, y_test) Result >> accuracy: 0.8216 Next: but when I load the saved model(Model88)
Continue readingTensorFlow train function with multiple layers
Issue I am new to tensor and trying to understand it. I managed to create one layer model. But I would like now to add 2 more. How can I make my train function working? I would like to train
Continue readingTensorflow dataset- batch_size and steps_per_epoch
Issue enter image description hereI work on an image segmentation problem where there is a pipeline for data in the format of tensorflow dataset and uses tensorflow iterator too. Now I have increased the number of training images from 250
Continue readingSaving a tensorflow model and loading it for further training
Issue I am training a CNN model I made with TensorFlow on a relatively large dataset (27G) in python. As my RAM is not capable of importing all of the data to feed into the model, I instead do something
Continue readingBatch size when running tf.Strategy vs. tf.data batch()
Issue I want to display the batch size when running a tf.distribute strategy. I do this by creating a custom Keras layer as so: class DebugLayer(tf.keras.layers.Layer): def __init__(self): super().__init__() def build(self, input_shape): pass def call(self, inputs): print_op = tf.print(“******Shape is:”,
Continue readingTimeDistributed layer
Issue sorry I’m new to keras and RNN in general. I have these data on which to make training. Shape of X_train=(n_steps=25, length_steps=3878, n_features=8), shape of y_train=(n_steps=25, n_features=4). Basically for each step with length 3878 and 8 features I have
Continue readingTensorFlow GradCAM – model.fit() – ValueError: Shapes (None, 1) and (None, 2) are incompatible
Issue As part of assignment 4, Coursera CV TF course, my code fails in model.fit() model.compile(loss=’categorical_crossentropy’,metrics= [‘accuracy’],optimizer=tf.keras.optimizers.RMSprop(lr=0.001)) # shuffle and create batches before training model.fit(train_batches,epochs=25) with error: ValueError: Shapes (None, 1) and (None, 2) are incompatible Any hint at where
Continue readingWill model.predict update a GRU layer states correctly?
Issue This is my first question, suggestions are appreciated! Background I built a model similar to this one. I am using model.predict(inputs) to make predictions and I built my custom functions and process to make it learn. It seems to
Continue readingIs it normal to get ETA: 6:43:26 hours to complete the first epoch
Issue I have crated the below vgg16 based CNN and I want to train it for 50 epochs. but it shows nearly 7 hours (ETA: 6:43:26) to complete the first epoch. could anyone please tell me is this normal with
Continue readingTraining a single model jointly over multiple datasets in tensorflow
Issue I want to train a single variational autoencoder model or even a standard autoencoder over many datasets jointly (e.g. mnist, cifar, svhn, etc. where all the images in the datasets are resized to be the same input shape). Here
Continue readingShould a custom keras true positive metric always return an integer?
Issue I’m working with a non-standard dataset, where my y_true is (batch x 5 x 1), and y_pred is (batch x 5 x 1). A batch sample i is "true" if any value of y_true[i] > 0., and it is
Continue readinghow can i train my CNN model on dataset from a .csv file?
Issue hi guys i’m a Python beginner and i’m using google Colab to train my first CNN model, i’m blocked on the training part, i know i have to use model.fit() to train the model, but i have no idea
Continue readingTypeError: 'int' object is not iterable while training a neural network
Issue I am trying to train NeRF (https://github.com/bmild/nerf), below is the error I am getting. I have tried to print the datatype of the of the variables. I do not know how to proceed next. Here is a code snippet:
Continue readingTraining the model of Shakespeare with GPU instead of TPU
Issue I’m trying to see the difference between training a model with TPU and GPU. This is the training model part : import time start = time.time() tf.keras.backend.clear_session() resolver = tf.distribute.cluster_resolver.TPUClusterResolver(tpu=’grpc://’ + os.environ[‘COLAB_TPU_ADDR’]) tf.config.experimental_connect_to_cluster(resolver) #TPU initialization tf.tpu.experimental.initialize_tpu_system(resolver) print("All devices: ",
Continue readingwhat does class_mode parameter in Keras image_gen.flow_from_directory() signify?
Issue train_image_gen = image_gen.flow_from_directory(‘/Users/harshpanwar/Desktop/Folder/train’, target_size=image_shape[:2], batch_size=batch_size, class_mode=’binary’) In the above code snippet what does class_mode=’binary’ signify. I think it is for the number of categories of images. I am using this code for training a image recognition classifier in Keras
Continue readingTextual Data Augmentation in Tensorflow
Issue I’m doing a sentiment analysis on the IMDB dataset in tensorflow and I’m trying to augment the training dataset by using the textaugment library which they said is ‘plug and play’ into tensorflow. So it should be rather simple,
Continue readingBinary classification not training correctly
Issue I’ve been working on a neural network that can classify two sets of astronomical data. I believe that my neural network is struggling because the two sets of data are quite similar, but even with significant changes to the
Continue readingHow does this split of train and evaluation data ensure there is no overlap?
Issue I am reading this sentiment classification tutorial from Tensorflow: https://www.tensorflow.org/tutorials/keras/text_classification The way it splits data into train and evaluate is the following code: batch_size = 32 seed = 42 raw_train_ds = tf.keras.preprocessing.text_dataset_from_directory( ‘aclImdb/train’, batch_size=batch_size, validation_split=0.2, subset=’training’, seed=seed) raw_val_ds =
Continue readingTensorflow Model fit format data correctly — TypeError: Cannot convert a symbolic Keras input/output to a numpy array
Issue For a NLP task, my input dataset is transformed to look like this : a list of list of integers. Features and Labels are the same dataset. >>>training_data = [[ 0 4 79 3179 11 44 8 1 11245
Continue readingProblem in LSTM train-test split in time series data
Issue I am trying to make a train set and test set with my csv file to train an LSTM. The csv file looks like this: datetime invno inkw outkw Total wind_spd temp pres ts 2021-12-01 00:00:00 1 0.0 0.0
Continue readingTensorflow Image classification get train_images/train_X and train_labels/train_y
Issue I’m working on a tensorflow model for identifying different butterfies. I’m using Neural networks for this and I’m reading images from folders and all the data gets split in a train dataset and validation dataset, but I want split
Continue readingfiting a model with multiple inputs
Issue I have a similar problem to this in my code, I wrote a simplified version of it : my model has two inputs, but no matter how I send the data to fit, it won’t work. here is a
Continue readingTraining of multi-headed neural network with labels only for certain heads at a time
Issue I am trying to train NN with 3 heads sharing some initial layers. However each of my training targets has only output for 2 of them. I would like to create separate batches with samples that contains output only
Continue readingWhen should I stop the object detection model training while mAP are not stable?
Issue I am re-training the SSD MobileNet with 900 images from the Berkeley Deep Drive dataset, and eval towards 100 images from that dataset. The problem is that after about 24 hours of training, the totalloss seems unable to go
Continue readingData type preference for training CNN?
Issue I originally was using input data of int8 type ranging from 0-255 before learning that standardizing and normalizing should increase learning speeds and accuracy. I attempted both, with and without a mean of zero, and none of these methods
Continue readingKeras: Validation accuracy stays the exact same but validation loss decreases
Issue I know that the problem can’t be with the dataset because I’ve seen other projects use the same dataset. Here is my data preprocessing code: import pandas as pd dataset = pd.read_csv(‘political_tweets.csv’) dataset.head() dataset = pd.read_csv(‘political_tweets.csv’)[“tweet”].values y_train = pd.read_csv(‘political_tweets.csv’)[“dem_or_rep”].values
Continue readingI am trying to resume training from a certain checkpoint (Tensorflow) because I'm using Colab and 12 hours aren't enough
Issue This is some part of the code I’m using checkpoint_dir = ‘training_checkpoints1’ checkpoint_prefix = os.path.join(checkpoint_dir, "ckpt") checkpoint = tf.train.Checkpoint(optimizer=optimizer, encoder=encoder, decoder=decoder) Now this is the training part EPOCHS = 900 for epoch in range(EPOCHS): start = time.time() hidden =
Continue readingAligning batched sliding frame timeseries data for tensorflow/keras using timeseries_dataset_from_array and TimeseriesGenerator respectively
Issue I have multiple input features and a singular target feature that correspond 1:1 to each other’s index; meaning there should be no forward-looking or backward-looking when it comes to comparing inputs to targets: input[t] <=> target[t]. Essentially, I have
Continue readingHow to properly use pre-trained CNN for image prediction on a folder of images
Issue I am trying to build a CNN model and use it on 2833 images to see if it can predict a selection (of my own choice) of three features and the popularity score from a tabular dataset. So far
Continue readingnormalize image with opencv in c++?
Issue I have a TfLite model that takes a standardized float32 image as an input, the pixel range should convert from the [0~255] to [-1~1] I wrote a demo function but it didn’t work. I couldn’t set the color value
Continue readingHow is the smooth dice loss differentiable?
Issue I am training a U-Net in keras by minimizing the dice_loss function that is popularly used for this problem: adapted from here and here def dsc(y_true, y_pred): smooth = 1. y_true_f = K.flatten(y_true) y_pred_f = K.flatten(y_pred) intersection = K.sum(y_true_f
Continue readinginput_image_meta shape error while using pixellib custom trainig on images
Issue I am using pixellib fot training custom image instance segmentation. I have created a dataset whiche can be seen below in link. Dataset:https://drive.google.com/drive/folders/1MjpDNZtzGRNxEtCDcTmrjUuB1ics_3Jk?usp=sharing the code which I used to make a custom model is import pixellib from pixellib.custom_train import
Continue readingReverse Image search (for image duplicates) on local computer
Issue I have a bunch of poor quality photos that I extracted from a pdf. Somebody I know has the good quality photo’s somewhere on her computer(Mac), but it’s my understanding that it will be difficult to find them. I
Continue readingReshape the input for BatchDataset trained model
Issue I trained my tensorflow model on images after convert it to BatchDataset IMG_size = 224 INPUT_SHAPE = [None, IMG_size, IMG_size, 3] # 4D input model.fit(x=train_data, epochs=EPOCHES, validation_data=test_data, validation_freq=1, # check validation metrics every epoch callbacks=[tensorboard, early_stopping]) model.compile( loss=tf.keras.losses.CategoricalCrossentropy(), optimizer=tf.keras.optimizers.Adam(),
Continue readingCreate Tensorflow Dataset with dataframe of images and labels
Issue I want to create a dataset with tensorflow and feed this with images as array (dtype=unit8) and labels as string. The images and the according labels are stored in a dataframe and the columns named as Image as Array
Continue readingHow to use Padding in conv2d layer of specific size
Issue My input size image is : 256 * 256 Conv2d Kernal Size : 4*4 and strides at 2*2. The output will be 127*127. I want to pass to Max Pool for this i want to apply padding to make
Continue readingHow to take tf.Tensor type to number type in Typescript
Issue I’m working with Tensorflow.js in typescript and I want to get the cosine similarity of two 1D tensors, but I am having trouble with dealing with the types that tensorflow uses. When I calculate the cosine similarity, using this
Continue readingCan't load tflite custom model into web using react
Issue I have 2 tflite models hosted as s3 objects on aws. In my react-typescript app, I am trying to load those models if the browser is opened on mobile. Else, the web app will use other more efficient models.
Continue reading