rnn_curve_predict.py 文件源码

python
阅读 35 收藏 0 点赞 0 评论 0

项目:rnn-tutorial-curve-predict 作者: timctho 项目源码 文件源码
def create_curve():
    # Create the curve which we want the RNN to learn
    plt.ion()
    fig = plt.figure(figsize=(10, 10))
    ax = plt.gca()
    r = np.arange(0, .34, 0.001)
    n_points = len(r)
    theta = 45 * np.pi * r
    x_offset, y_offset = .5, .5
    y_curve_points = 1.4 * r * np.sin(theta) + y_offset
    x_curve_points = r * np.cos(theta) + x_offset
    curve = list(zip(x_curve_points, y_curve_points))
    collection = LineCollection([curve], colors='k')
    ax.add_collection(collection)
    return ax, n_points, x_curve_points, y_curve_points
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号