Skip to main content

Posts

Showing posts from June, 2021

Placeholder Shape - Tensorflow

 Placeholder can be defined as: tf.placeholder(tf.float32, shape=(1, 16, 64, 64, 1), name='real_node_a')  or tf.placeholder(tf.float32, shape=(None, None, None, None, None), name='real_node_a')  If you want to read shape from None, use: h      = tf.shape(inputs)[2] w      = tf.shape(inputs)[3] If you want to read shape from numbers, use: nb, nt = inputs.get_shape().as_list()[0:2] sometimes some nodes in the graph require integer input instead of None, in that case you must hard code placeholder with numbers and use get_shape None provides more flexibility but might not work with all.

Makefile / Make

 https://sourceforge.net/projects/gnuwin32/ Install this and add C:\Program Files (x86)\GnuWin32\bin to path Then you can run make from command prompt / powershell https://makefiletutorial.com/ For make, You will need a 'Makefile' in the folder where you are trying to run make from. make is basically like an automation script