def create_input_layer(self, batch_input_shape,
input_dtype=None, name=None):
if not name:
prefix = self.__class__.__name__.lower() + '_input_'
name = prefix + str(K.get_uid(prefix))
if not input_dtype:
input_dtype = K.floatx()
self.batch_input_shape = batch_input_shape
self.input_dtype = input_dtype
# instantiate the input layer
x = Input(batch_shape=batch_input_shape,
dtype=input_dtype, name=name)
# this will build the current layer
# and create the node connecting the current layer
# to the input layer we just created.
self(x)
评论列表
文章目录