keras pyspark_keras keras_utils - CSDN
  • 2.PySpark环境 3.问题描述 4.原因分析 1.背景介绍 机器学习平台底层基于大数据平台提供计算资源,在机器学习平台上主要使用 Spark MLlib 实现了共 7 类(源/目标、统计分析、数据预处理、特征工程、机器学习、...

    目录

    1.背景介绍

    2.PySpark环境

    3.问题描述

    4.原因分析


    1.背景介绍

    机器学习平台底层基于大数据平台提供计算资源,在机器学习平台上主要使用 Spark MLlib 实现了共 7 类(源/目标、统计分析、数据预处理、特征工程、机器学习、工具、文本分析) 90+ 个组件(每个组件代表内置的逻辑片段),目的是减少用户重复开发工作、降低机器学习门槛。

     

    2.PySpark环境

     

    工具类组件中有【PySpark组件】,底层使用在虚拟机上通过 Anaconda 创建的虚拟环境作为每个组件实例具体执行环境。

     

    3.问题描述

     

    在使用 Keras(Tensorflow)中基于神经网络的降维方法 AutoEncoder 识别异常点时,出现如下错误:

     

    4.原因分析

     

    在虚拟机中使用 conda 命令安装 keras: "conda install -c conda-forge keras",如下图所示:

     

    Keras 版本 Tensorflow 版本的对应关系(https://docs.floydhub.com/guides/environments/)如下图所示:

     

    故可以使用命令 "conda install -c conda-forge keras=2.2.0" 安装指定版本的 keras。

     

     

     

    展开全文
  • keras on spark

    2017-08-29 16:36:10
  • NumPy NumPy 是 Python 的一个扩充程序库,支持高级大量的维度数组与矩阵运算,此外也针对数组运算提供大量的数学函数库。内部解除了 Python 的 PIL (全局解释器锁),同时使用 C/C++ 做扩展,运算效率极好,是大量...

     

    NumPy

    NumPy 是 Python 的一个扩充程序库,支持高级大量的维度数组与矩阵运算,此外也针对数组运算提供大量的数学函数库。内部解除了 Python 的 PIL (全局解释器锁),同时使用 C/C++ 做扩展,运算效率极好,是大量机器学习框架的基础库。

    速查表:

     

    Pandas

    Pandas 是一个基于 NumPy 的工具,主要是为了解决数据分析任务,包括了一些标准的数据模型,提供了高效地操作大型数据集所需的工具。

    速查表1:

    速查表2:

    SciPy

    SciPy是基于NumPy开发的高级模块,它提供了许多数学算法和函数的实现,用于解决科学计算中的一些标准问题。例如数值积分和微分方程求解,扩展的矩阵计算,最优化,概率分布和统计函数,甚至包括信号处理等。

    速查表:

     

    Matplotlib

    Matplotlib 是 Python 的一个绘图库。它包含了大量的工具,你可以使用这些工具创建各种图形,包括简单的散点图,正弦曲线,甚至是三维图形。Python 科学计算社区经常使用它完成数据可视化的工作。

    速查表:

     

    sklearn

    sklearn是一个Python第三方提供的非常强力的机器学习库,它包含了从数据预处理到训练模型的各个方面。在实战使用scikit-learn中可以极大的节省我们编写代码的时间以及减少我们的代码量,使我们有更多的精力去分析数据分布,调整模型和修改超参。

    速查表:

     

    PySpark

    Spark是基于内存计算的大数据并行计算框架.Spark基于内存计算,提高了在大数据环境下数据处理的实时性,同时保证了高容错性和高可伸缩性,允许用户将Spark部署在大量的廉价硬件之上,形成集群。PySpark是针对Spark的Python API。

    速查表:

     

    Keras

    Keras 是一个用 Python 编写的高级神经网络 API,它能够以 TensorFlow, CNTK, 或者 Theano 作为后端运行。Keras 的开发重点是支持快速的实验。能够以最小的时延把你的想法转换为实验结果,是做好研究的关键。

    速查表:

     

    dplyr

    dplyr包是 Hadley Wickham (ggplot2包的作者,被称作“一个改变R的人”)的杰作, 并自称 a grammar of data manipulation, 他将原本plyr 包中的ddply()等函数进一步分离强化,专注接受dataframe对象, 大幅提高了速度, 并且提供了更稳健的与其它数据库对象间的接口。

    tidyr

    tidyr包的作者是Hadley Wickham, 该包用于“tidy”你的数据,这个包常跟dplyr结合使用。

    速查表1:

    速查表2:

    Neural Network

    人工神经网络(Artificial Neural Network,即ANN ),是20世纪80 年代以来人工智能领域兴起的研究热点。 它从信息处理角度对人脑神经元网络进行抽象, 建立某种简单模型,按不同的连接方式组成不同的网络。

    速查表:

    关注公众号:

    展开全文
  • Spark ML model pipelines on Distributed Deep Neural Nets This notebook describes how to build machine learning ...pipelines with Spark ML for distributed versions of Keras deep learning models. As dat

    Spark ML model pipelines on Distributed Deep Neural Nets

    This notebook describes how to build machine learning pipelines with Spark ML for distributed versions of Keras deep learning models. As data set we use the Otto Product Classification challenge from Kaggle. The reason we chose this data is that it is small and very structured. This way, we can focus more on technical components rather than prepcrocessing intricacies. Also, users with slow hardware or without a full-blown Spark cluster should be able to run this example locally, and still learn a lot about the distributed mode.

    Often, the need to distribute computation is not imposed by model training, but rather by building the data pipeline, i.e. ingestion, transformation etc. In training, deep neural networks tend to do fairly well on one or more GPUs on one machine. Most of the time, using gradient descent methods, you will process one batch after another anyway. Even so, it may still be beneficial to use frameworks like Spark to integrate your models with your surrounding infrastructure. On top of that, the convenience provided by Spark ML pipelines can be very valuable (being syntactically very close to what you might know from scikit-learn).

    TL;DR: We will show how to tackle a classification problem using distributed deep neural nets and Spark ML pipelines in an example that is essentially a distributed version of the one found here.

    Using this notebook

    As we are going to use elephas, you will need access to a running Spark context to run this notebook. If you don’t have it already, install Spark locally by following the instructions provided here. Make sure to also export SPARK_HOME to your path and start your ipython/jupyter notebook as follows:

    IPYTHON_OPTS="notebook" ${SPARK_HOME}/bin/pyspark --driver-memory 4G elephas/examples/Spark_ML_Pipeline.ipynb

    To test your environment, try to print the Spark context (provided as sc), i.e. execute the following cell.

    from __future__ import print_function
    print(sc)
    <pyspark.context.SparkContext object at 0x1132d61d0>
    

    Otto Product Classification Data

    Training and test data is available here. Go ahead and download the data. Inspecting it, you will see that the provided csv files consist of an id column, 93 integer feature columns. train.csv has an additional column for labels, which test.csv is missing. The challenge is to accurately predict test labels. For the rest of this notebook, we will assume data is stored at data_path, which you should modify below as needed.

    data_path = "./" # <-- Make sure to adapt this to where your csv files are.
    
    

    Loading data is relatively simple, but we have to take care of a few things. First, while you can shuffle rows of an RDD, it is generally not very efficient. But since data in train.csv is sorted by category, we’ll have to shuffle in order to make the model perform well. This is what the function shuffle_csv below is for. Next, we read in plain text in load_data_rdd, split lines by comma and convert features to float vector type. Also, note that the last column in train.csv represents the category, which has a Class_ prefix.

    Defining Data Frames

    Spark has a few core data structures, among them is the data frame, which is a distributed version of the named columnar data structure many will now from either R or Pandas. We need a so called SQLContext and an optional column-to-names mapping to create a data frame from scratch.

    from pyspark.sql import SQLContext
    from pyspark.mllib.linalg import Vectors
    import numpy as np
    import random
    
    sql_context = SQLContext(sc)
    
    def shuffle_csv(csv_file):
        lines = open(csv_file).readlines()
        random.shuffle(lines)
        open(csv_file, 'w').writelines(lines)
    
    def load_data_frame(csv_file, shuffle=True, train=True):
        if shuffle:
            shuffle_csv(csv_file)
        data = sc.textFile(data_path + csv_file) # This is an RDD, which will later be transformed to a data frame
        data = data.filter(lambda x:x.split(',')[0] != 'id').map(lambda line: line.split(','))
        if train:
            data = data.map(
                lambda line: (Vectors.dense(np.asarray(line[1:-1]).astype(np.float32)),
                              str(line[-1])) )
        else:
            # Test data gets dummy labels. We need the same structure as in Train data
            data = data.map( lambda line: (Vectors.dense(np.asarray(line[1:]).astype(np.float32)),"Class_1") ) 
        return sqlContext.createDataFrame(data, ['features', 'category'])
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24

    Let’s load both train and test data and print a few rows of data using the convenient show method.

    train_df = load_data_frame("train.csv")
    test_df = load_data_frame("test.csv", shuffle=False, train=False) # No need to shuffle test data
    
    print("Train data frame:")
    train_df.show(10)
    
    print("Test data frame (note the dummy category):")
    test_df.show(10)
    • 1
    Train data frame:
    +--------------------+--------+
    |            features|category|
    +--------------------+--------+
    |[0.0,0.0,0.0,0.0,...| Class_8|
    |[0.0,0.0,0.0,0.0,...| Class_8|
    |[0.0,0.0,0.0,0.0,...| Class_2|
    |[0.0,1.0,0.0,1.0,...| Class_6|
    |[0.0,0.0,0.0,0.0,...| Class_9|
    |[0.0,0.0,0.0,0.0,...| Class_2|
    |[0.0,0.0,0.0,0.0,...| Class_2|
    |[0.0,0.0,0.0,0.0,...| Class_3|
    |[0.0,0.0,4.0,0.0,...| Class_8|
    |[0.0,0.0,0.0,0.0,...| Class_7|
    +--------------------+--------+
    only showing top 10 rows
    
    Test data frame (note the dummy category):
    +--------------------+--------+
    |            features|category|
    +--------------------+--------+
    |[1.0,0.0,0.0,1.0,...| Class_1|
    |[0.0,1.0,13.0,1.0...| Class_1|
    |[0.0,0.0,1.0,1.0,...| Class_1|
    |[0.0,0.0,0.0,0.0,...| Class_1|
    |[2.0,0.0,5.0,1.0,...| Class_1|
    |[0.0,0.0,0.0,0.0,...| Class_1|
    |[0.0,0.0,0.0,0.0,...| Class_1|
    |[0.0,0.0,0.0,1.0,...| Class_1|
    |[0.0,0.0,0.0,0.0,...| Class_1|
    |[0.0,0.0,0.0,0.0,...| Class_1|
    +--------------------+--------+
    only showing top 10 rows
    

    Preprocessing: Defining Transformers

    Up until now, we basically just read in raw data. Luckily, Spark ML has quite a few preprocessing features available, so the only thing we will ever have to do is define transformations of data frames.

    To proceed, we will first transform category strings to double values. This is done by a so called StringIndexer. Note that we carry out the actual transformation here already, but that is just for demonstration purposes. All we really need is too define string_indexer to put it into a pipeline later on.

    from pyspark.ml.feature import StringIndexer
    
    string_indexer = StringIndexer(inputCol="category", outputCol="index_category")
    fitted_indexer = string_indexer.fit(train_df)
    indexed_df = fitted_indexer.transform(train_df)
    
    • 4
    • 5

    Next, it’s good practice to normalize the features, which is done with a StandardScaler.

    from pyspark.ml.feature import StandardScaler
    
    scaler = StandardScaler(inputCol="features", outputCol="scaled_features", withStd=True, withMean=True)
    fitted_scaler = scaler.fit(indexed_df)
    scaled_df = fitted_scaler.transform(indexed_df)
    print("The result of indexing and scaling. Each transformation adds new columns to the data frame:")
    scaled_df.show(10)
    The result of indexing and scaling. Each transformation adds new columns to the data frame:
    +--------------------+--------+--------------+--------------------+
    |            features|category|index_category|     scaled_features|
    +--------------------+--------+--------------+--------------------+
    |[0.0,0.0,0.0,0.0,...| Class_8|           2.0|[-0.2535060296260...|
    |[0.0,0.0,0.0,0.0,...| Class_8|           2.0|[-0.2535060296260...|
    |[0.0,0.0,0.0,0.0,...| Class_2|           0.0|[-0.2535060296260...|
    |[0.0,1.0,0.0,1.0,...| Class_6|           1.0|[-0.2535060296260...|
    |[0.0,0.0,0.0,0.0,...| Class_9|           4.0|[-0.2535060296260...|
    |[0.0,0.0,0.0,0.0,...| Class_2|           0.0|[-0.2535060296260...|
    |[0.0,0.0,0.0,0.0,...| Class_2|           0.0|[-0.2535060296260...|
    |[0.0,0.0,0.0,0.0,...| Class_3|           3.0|[-0.2535060296260...|
    |[0.0,0.0,4.0,0.0,...| Class_8|           2.0|[-0.2535060296260...|
    |[0.0,0.0,0.0,0.0,...| Class_7|           5.0|[-0.2535060296260...|
    +--------------------+--------+--------------+--------------------+
    only showing top 10 rows
    

    Keras Deep Learning model

    Now that we have a data frame with processed features and labels, let’s define a deep neural net that we can use to address the classification problem. Chances are you came here because you know a thing or two about deep learning. If so, the model below will look very straightforward to you. We build a keras model by choosing a set of three consecutive Dense layers with dropout and ReLU activations. There are certainly much better architectures for the problem out there, but we really just want to demonstrate the general flow here.

    from keras.models import Sequential
    from keras.layers.core import Dense, Dropout, Activation
    from keras.utils import np_utils, generic_utils
    
    nb_classes = train_df.select("category").distinct().count()
    input_dim = len(train_df.select("features").first()[0])
    
    model = Sequential()
    model.add(Dense(512, input_shape=(input_dim,)))
    model.add(Activation('relu'))
    model.add(Dropout(0.5))
    model.add(Dense(512))
    model.add(Activation('relu'))
    model.add(Dropout(0.5))
    model.add(Dense(512))
    model.add(Activation('relu'))
    model.add(Dropout(0.5))
    model.add(Dense(nb_classes))
    model.add(Activation('softmax'))
    
    model.compile(loss='categorical_crossentropy', optimizer='adam')

    Distributed Elephas model

    To lift the above Keras model to Spark, we define an Estimator on top of it. An Estimator is Spark’s incarnation of a model that still has to be trained. It essentially only comes with only a single (required) method, namely fit. Once we call fit on a data frame, we get back a Model, which is a trained model with a transform method to predict labels.

    We do this by initializing an ElephasEstimator and setting a few properties. As by now our input data frame will have many columns, we have to tell the model where to find features and labels by column name. Then we provide serialized versions of Keras model and Elephas optimizer. We can not plug in keras models into the Estimator directly, as Spark will have to serialize them anyway for communication with workers, so it’s better to provide the serialization ourselves. In fact, while pyspark knows how to serialize model, it is extremely inefficient and can break if models become too large. Spark ML is especially picky (and rightly so) about parameters and more or less prohibits you from providing non-atomic types and arrays of the latter. Most of the remaining parameters are optional and rather self explainatory. Plus, many of them you know if you have ever run a keras model before. We just include them here to show the full set of training configuration.

    from elephas.ml_model import ElephasEstimator
    from elephas import optimizers as elephas_optimizers
    
    # Define elephas optimizer (which tells the model how to aggregate updates on the Spark master)
    adadelta = elephas_optimizers.Adadelta()
    
    # Initialize SparkML Estimator and set all relevant properties
    estimator = ElephasEstimator()
    estimator.setFeaturesCol("scaled_features")             # These two come directly from pyspark,
    estimator.setLabelCol("index_category")                 # hence the camel case. Sorry :)
    estimator.set_keras_model_config(model.to_yaml())       # Provide serialized Keras model
    estimator.set_optimizer_config(adadelta.get_config())   # Provide serialized Elephas optimizer
    estimator.set_categorical_labels(True)
    estimator.set_nb_classes(nb_classes)
    estimator.set_num_workers(1)  # We just use one worker here. Feel free to adapt it.
    estimator.set_nb_epoch(20) 
    estimator.set_batch_size(128)
    estimator.set_verbosity(1)
    estimator.set_validation_split(0.15)
    ElephasEstimator_415398ab22cb1699f794
    

    SparkML Pipelines

    Now for the easy part: Defining pipelines is really as easy as listing pipeline stages. We can provide any configuration of Transformers and Estimators really, but here we simply take the three components defined earlier. Note that string_indexer and scaler and interchangable, while estimator somewhat obviously has to come last in the pipeline.

    from pyspark.ml import Pipeline
    
    pipeline = Pipeline(stages=[string_indexer, scaler, estimator])

    Fitting and evaluating the pipeline

    The last step now is to fit the pipeline on training data and evaluate it. We evaluate, i.e. transform, on training data, since only in that case do we have labels to check accuracy of the model. If you like, you could transform the test_df as well.

    from pyspark.mllib.evaluation import MulticlassMetrics
    
    fitted_pipeline = pipeline.fit(train_df) # Fit model to data
    
    prediction = fitted_pipeline.transform(train_df) # Evaluate on train data.
    # prediction = fitted_pipeline.transform(test_df) # <-- The same code evaluates test data.
    pnl = prediction.select("index_category", "prediction")
    pnl.show(100)
    
    prediction_and_label = pnl.map(lambda row: (row.index_category, row.prediction))
    metrics = MulticlassMetrics(prediction_and_label)
    print(metrics.precision())
    61878/61878 [==============================] - 0s     
    +--------------+----------+
    |index_category|prediction|
    +--------------+----------+
    |           2.0|       2.0|
    |           2.0|       2.0|
    |           0.0|       0.0|
    |           1.0|       1.0|
    |           4.0|       4.0|
    |           0.0|       0.0|
    |           0.0|       0.0|
    |           3.0|       3.0|
    |           2.0|       2.0|
    |           5.0|       0.0|
    |           0.0|       0.0|
    |           4.0|       4.0|
    |           0.0|       0.0|
    |           4.0|       1.0|
    |           2.0|       2.0|
    |           1.0|       1.0|
    |           0.0|       0.0|
    |           6.0|       0.0|
    |           2.0|       2.0|
    |           1.0|       1.0|
    |           2.0|       2.0|
    |           8.0|       8.0|
    |           1.0|       1.0|
    |           5.0|       0.0|
    |           0.0|       0.0|
    |           0.0|       3.0|
    |           0.0|       0.0|
    |           1.0|       1.0|
    |           4.0|       4.0|
    |           2.0|       2.0|
    |           0.0|       3.0|
    |           3.0|       3.0|
    |           0.0|       0.0|
    |           3.0|       0.0|
    |           1.0|       5.0|
    |           3.0|       3.0|
    |           2.0|       2.0|
    |           1.0|       1.0|
    |           0.0|       0.0|
    |           2.0|       2.0|
    |           2.0|       2.0|
    |           1.0|       1.0|
    |           6.0|       6.0|
    |           1.0|       1.0|
    |           0.0|       3.0|
    |           7.0|       0.0|
    |           0.0|       0.0|
    |           0.0|       0.0|
    |           1.0|       1.0|
    |           1.0|       1.0|
    |           6.0|       6.0|
    |           0.0|       0.0|
    |           0.0|       3.0|
    |           2.0|       2.0|
    |           0.0|       0.0|
    |           2.0|       2.0|
    |           0.0|       0.0|
    |           4.0|       4.0|
    |           0.0|       0.0|
    |           6.0|       6.0|
    |           2.0|       5.0|
    |           0.0|       3.0|
    |           3.0|       0.0|
    |           0.0|       0.0|
    |           3.0|       3.0|
    |           4.0|       4.0|
    |           0.0|       3.0|
    |           0.0|       0.0|
    |           0.0|       0.0|
    |           4.0|       4.0|
    |           3.0|       0.0|
    |           2.0|       2.0|
    |           1.0|       1.0|
    |           7.0|       7.0|
    |           0.0|       0.0|
    |           0.0|       0.0|
    |           0.0|       3.0|
    |           1.0|       1.0|
    |           1.0|       1.0|
    |           5.0|       4.0|
    |           1.0|       1.0|
    |           1.0|       1.0|
    |           4.0|       4.0|
    |           3.0|       3.0|
    |           0.0|       0.0|
    |           2.0|       2.0|
    |           4.0|       4.0|
    |           7.0|       7.0|
    |           2.0|       2.0|
    |           0.0|       0.0|
    |           1.0|       1.0|
    |           0.0|       0.0|
    |           4.0|       4.0|
    |           1.0|       1.0|
    |           0.0|       0.0|
    |           0.0|       0.0|
    |           0.0|       0.0|
    |           0.0|       3.0|
    |           0.0|       3.0|
    |           0.0|       0.0|
    +--------------+----------+
    only showing top 100 rows
    
    0.764132648114
    

    Conclusion

    It may certainly take some time to master the principles and syntax of both Keras and Spark, depending where you come from, of course. However, we also hope you come to the conclusion that once you get beyond the stage of struggeling with defining your models and preprocessing your data, the business of building and using SparkML pipelines is quite an elegant and useful one.

    If you like what you see, consider helping further improve elephas or contributing to Keras or Spark. Do you have any constructive remarks on this notebook? Is there something you want me to clarify? In any case, feel free to contact me.

    展开全文
  • pyspark基础教程

    2019-03-05 22:47:24
    pyspark基础教程 下面一段代码是简单教程,对与如何向spark 集群提交代码任务,无论文档和博客都有很多说法,其实很简单,只要在脚本中setMaster(“spark://192.168.10.182:7077”), spark://192.168.10.182:7077是...
  • 该笔记本描述了如何使用Spark ML为分布式版本的Keras深度学习模型构建机器学习流水线。作为数据集,我们使用来自Kaggle的Otto产品分类挑战。我们选择这个数据的原因是它很小,结构非常好。这样,我们可以更多地关注...
  • 如题,我早先自学的是tf,昨天入了一下keras的坑,没用服务器,用我这个丐版的联想本装了一个基于theano的keras,一开始跑了一个全连接的神经网络,没啥问题。然后又做了一个很小的cnn,(代码如下),能够用 model....
  • 在本文中,我们将演示计算机视觉问题,它具有结合两种最先进技术的能力:深度学习和Apache Spark。我们将利用深度学习管道的强大功能来解决多类图像分类问题。PySpa...
  • #!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Jun 8 09:27:08 2018 @author: luogan ...from pyspark.ml.regression import RandomForestRegressor fro...
  • 介绍深度神经网络模型Keras,以及如何自动部署Keras模型到生产环境中
  • pyspark 数据读写

    2020-06-05 16:52:05
    dataframe数据 保存 创建数据 output_df = sqlContext.createDataFrame( [{'a': [2, 3, 4], 'b': [1, 2, 3], 'c': ['a', 'b', 'c'], 'd': ['a','b','c']}, {'a': [3,4,5], 'b': [4,5,6], 'c': ['c','c','d'], 'd':...
  • Keras之MLPR:利用MLPR算法(3to1【窗口法】+【Input(3)→(12+8)(relu)→O(mse)】)实现根据历史航空旅客数量数据集(时间序列数据)预测下月乘客数量问题 目录 输出结果 设计思路 代码实现 输出结果...
  • 1.保持序列模型和函数模型 # 构建一个简单的模型并训练 from __future__ import absolute_import, division, print_...tf.keras.backend.clear_session() from tensorflow import keras from tensorflow.kera...
  • (原文链接)-这是Spark2018 Submit 的一个演讲Demo, 针对Keras图片分类和使用Spark做分类的方法做了讲解,供学习使用。 keras_dlp_image_classifier(Python)  Import Notebook Part 1: Exploring and Classifying...
  • 最终目标 最终目标:为了提高机器学习特别是深度学习的计算速度。提供的速度有三个方法:让算法的变得更加聪明(数据结构);让单个机器的计算能力增强(更好的CPU/GPU);让计算并行化(多线程;...
  • Spark ML model pipelines on Distributed Deep Neural NetsThis notebook describes how to build machine learning pipelines with Spark ML for distributed versions of Keras deep learning models....
  • 构建TFRecords文件 TFRecords其实是一种二进制文件,虽然它不如其他格式好理解,但是它能更好的利用内存,更方便复制和移动,并且不...from pyspark.sql import SparkSession spark = SparkSession \ .builder ...
  • 人工智能AI:Keras PyTorch MXNet TensorFlow PaddlePaddle 深度学习实战(不定时更新) 6-7,使用spark-scala调用tensorflow2.0训练好的模型 本篇文章介绍在spark中调用训练好的tensorflow模型进行预测的方法。 ...
1 2 3 4 5 ... 20
收藏数 462
精华内容 184
关键字:

keras pyspark