HUJI-Deep / simnets-tf

SimNets implementation in TensorFlow
MIT License
7 stars 3 forks source link

More flexible MEX's blocks, strides, and padding syntax in Keras and Tensorflow #4

Closed orsharir closed 7 years ago

orsharir commented 7 years ago

It could be that I've forgot to specify it, but the blocks syntax should allow for the user to specify that a dimension stretches to the size of the input. In Caffe we do this with negative numbers, e.g. if block_c = -1 is given by the user, then at runtime we replace it with block_c = <number of input channels>. I believe we should adopt the same syntax for Tensorflow, with a slight improvement: in python, the operator should allow lists of length 2, and automatically expand the list from [block_h block_w] to [-1 block_h block_w] -- this should be for both the low-level Tensorflow python's ops, as well as in Keras. The same logic should be applied to the padding and strides syntax as well.