Skip to content

Tag: tensorflow

How to calculate factorial in tensorflow?

I am new to tensorflow, I am trying to find a function that calculates the n!. I saw that one can use the gamma function, which was possible with theano, but did not work for tensorflow. I am using a for loop to multiply number from n to 1, but I assume there is an easier and faster way. I

tensorflow – how to add an if statement?

This is a simplified version of what I am trying to do: Yet when trying to run this I get: How to fix this? EDIT: results in a: : Tensor(“cond/Merge:0”, shape=(?, 128), dtype=float32) Answer tensorflow objects can’t be used with regular python objects and functions. That’s how tensorfl…

Mixture usage of CPU and GPU in Keras

I am building a neural network on Keras, including multiple layers of LSTM, Permute and Dense. It seems LSTM is GPU-unfriendly. So I did research and use But based on my understanding about with, with is try…finally block to ensure that clean-up code is executed. I don’t know whether the following…

Standalone Protocol buffer file in tensorflow and its usage?

I have a .pb file alone created using freeze_graph.py. Other than the standalone .pb file i don’t have any files in the folder. Till now i have figured out a way to visualize the model using tensor board and to fetch the tensors involved in the Net. Also the .pb was a model created using ResNet architec…

load weights require h5py

Im trying to run a keras model,trying to use pre-trained VGGnet- When i run this Command base_model = applications.VGG16(weights=’imagenet’, include_top=False, input_shape=(img_rows, img_cols, img_channel)) I get this error: I went through some github issues page where a relevant question was aske…