pyspark/bigdl/keras/converter.py
def load_weights_from_hdf5(bmodel, kmodel, filepath, by_name=False):
        '''Loads all layer weights from a HDF5 save file.
        filepath can be stored in a local file system, HDFS, S3,
        or any Hadoop-supported file system.
        If `by_name` is False (default) weights are loaded
        based on the network's execution order topology,
        meaning layers in the execution seq should be exactly the same
        the architecture

        If `by_name` is True, weights are loaded into layers
        only if they share the same name. This is useful
        for fine-tuning or transfer-learning models where
        some of the layers have changed.
        '''
        local_file_path = BCommon.get_local_file(filepath)
        kmodel.load_weights(filepath=local_file_path, by_name=by_name)
        WeightLoader.load_weights_from_kmodel(bmodel, kmodel)
def load_weights_from_hdf5(bmodel, kmodel, filepath, by_name=False):
        '''Loads all layer weights from a HDF5 save file.
        filepath can be stored in a local file system, HDFS, S3,
        or any Hadoop-supported file system.
        If `by_name` is False (default) weights are loaded
        based on the network's execution order topology,
        meaning layers in the execution seq should be exactly the same
        the architecture

        If `by_name` is True, weights are loaded into layers
        only if they share the same name. This is useful
        for fine-tuning or transfer-learning models where
        some of the layers have changed.
        '''
        local_file_path = BCommon.get_local_file(filepath)
        kmodel.load_weights(filepath=local_file_path, by_name=by_name)
        WeightLoader.load_weights_from_kmodel(bmodel, kmodel)
def load_weights_from_hdf5 ( bmodel , kmodel , filepath , by_name = False ) : local_file_path = BCommon . get_local_file ( filepath ) kmodel . load_weights ( filepath = local_file_path , by_name = by_name ) WeightLoader . load_weights_from_kmodel ( bmodel , kmodel )
Loads all layer weights from a HDF5 save file.
        filepath can be stored in a local file system, HDFS, S3,
        or any Hadoop-supported file system.
        If `by_name` is False (default) weights are loaded
        based on the network's execution order topology,
        meaning layers in the execution seq should be exactly the same
        the architecture

        If `by_name` is True, weights are loaded into layers
        only if they share the same name. This is useful
        for fine-tuning or transfer-learning models where
        some of the layers have changed.
Loads all layer weights from a HDF5 save file . filepath can be stored in a local file system HDFS S3 or any Hadoop - supported file system . If by_name is False ( default ) weights are loaded based on the network s execution order topology meaning layers in the execution seq should be exactly the same the architecture