Skip to content
Advertisement

Tag: tensorflow

Predicting in parallel using concurrent.futures of tensorflow.keras models

I am trying to implement some parallel jobs using concurrent.futures. Each worker requires a copy of a TensorFlow model and some data. I implemented it in the following way (MWE) simple_model() creates the model. clone_model clones a TensorFlow model. work represents an MWE of possible work. worker assigns the work in parallel. This is not working, it just stuck and

shape of an output tensor after convolutional filter on a colour image

I find it difficult to understand a notion about tensors. For VGG (https://www.tensorflow.org/api_docs/python/tf/keras/applications/VGG16), we start from a batch of colour images (none,224,224,3) and apply 64 2D convolutional filters. At the output we obtain a tensor of (none,224,224,64), we can see this by making a summary of the model. However, a filter must treat all 3 colours and my intuition tells

TypeError: Input ‘y’ of ‘Mul’ Op has type float32 that does not match type int64 of argument ‘x’

after this code i am getting the error in categoricalfocalloss i m not getting whereint64 error is coming model description here in this code , in the loss categoricalfocal loss is used here in the model i used categorical focal loss when i run this ,in train dataset i am not getting how tcovert itintointoint64 error is got is mentioned

Tensorflow dataset from numpy array

I have two numpy Arrays (X, Y) which I want to convert to a tensorflow dataset. According to the documentation it should be possible to run When doing this however I get the error: ValueError: Shapes (15, 1) and (768, 15) are incompatible This would make sense if the shapes of the numpy Arrays would be incompatible to the expected

Advertisement