@@ -0,0 +1,1075 @@
+#%0A# Copyright 2018 Analytics Zoo Authors.%0A#%0A# Licensed under the Apache License, Version 2.0 (the %22License%22);%0A# you may not use this file except in compliance with the License.%0A# You may obtain a copy of the License at%0A#%0A#     http://www.apache.org/licenses/LICENSE-2.0%0A#%0A# Unless required by applicable law or agreed to in writing, software%0A# distributed under the License is distributed on an %22AS IS%22 BASIS,%0A# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A# See the License for the specific language governing permissions and%0A# limitations under the License.%0A#%0Afrom zoo.common import Sample%0A%0A%0Adef to_sample_rdd(x, y, sc, num_slices=None):%0A    %22%22%22%0A    Conver x and y into RDD%5BSample%5D%0A    :param sc: SparkContext%0A    :param x: ndarray and the first dimension should be batch%0A    :param y: ndarray and the first dimension should be batch%0A    :param numSlices:%0A    :return:%0A    %22%22%22%0A    x_rdd = sc.parallelize(x, num_slices)%0A    y_rdd = sc.parallelize(y, num_slices)%0A    return x_rdd.zip(y_rdd).map(lambda item: Sample.from_ndarray(item%5B0%5D, item%5B1%5D))%0A

Move to_sample_rdd to utils and remove tfnet from pipeline api (#2497)