数据结构,我的数据如下大小:
batch_size=2
内含两个张量
input1.size=[?, 640,480,128]
input2.size=[?,640,480]
张量函数 希望没有batch_size,即输入不含?这个维度:[640,480,128], [640,480], 我希望tensorflow能够自动的对batch内的张量函数操作.
函数fn,接收a = [640,480,128], b = [640,480]
返回 数据类型是float
all credit belongs to the author, this is just a note.
def superDC(input):
a = input[0]
b = input[1]
def fn(a, b):
high = tf.map_fn(lambda inp: fn(inp[0], inp[1]), (a, b), dtype=np.float32)