def get_outdim(self):
#assert in_x == self.b.get_outdim()
# relaxing input dimension equal to output dimension. taking into
# account the padding scheme considered.
out_d_b = self.b.get_outdim()
in_d = self.in_d
if len(out_d_b) == len(in_d):
out_d = tuple(
[max(od_i, id_i) for (od_i, id_i) in zip(out_d_b, in_d)])
else:
# flattens both input and output.
out_d_b_flat = np.product(out_d_b)
in_d_flat = np.product(in_d)
out_d = (max(out_d_b_flat, in_d_flat) ,)
return out_d
评论列表
文章目录