3. 考虑[https://github.com/tensorflow/nmt/](https://github.com/tensorflow/nmt/) ,我们将定义第一个嵌入层。 嵌入层接受输入,词汇量 V 和输出嵌入空间的所需大小。 词汇量使得仅考虑 V 中最频繁的单词进行嵌入,而所有其他单词都映射到一个常见的*未知*术语。 在我们的例子中,输入是主要时间的,这意味着最大时间是第一个输入参数( [https://www.tensorflow.org/api_docs/python/tf/nn/dynamic_rnn](https://www.tensorflow.org/api_docs/python/tf/nn/dynamic_rnn) ):
3. 考虑[这里](https://github.com/tensorflow/nmt/),我们将定义第一个嵌入层。 嵌入层接受输入,词汇量 V 和输出嵌入空间的所需大小。 词汇量使得仅考虑 V 中最频繁的单词进行嵌入,而所有其他单词都映射到一个常见的*未知*术语。 在我们的例子中,输入是主要时间的,这意味着最大时间是[第一个输入参数](https://www.tensorflow.org/api_docs/python/tf/nn/dynamic_rnn):
在本食谱中,我们将学习如何使用 RNN 预测未来的比特币价值。 关键思想是,过去观察到的值的时间顺序可以很好地预测未来的值。 对于此食谱,我们将使用 MIT 许可下的 [https://github.com/guillaume-chevalier/seq2seq-signal-prediction](https://github.com/guillaume-chevalier/seq2seq-signal-prediction) 上提供的代码。 给定时间间隔的比特币值通过 API 从 [https://www.coindesk.com/api/](https://www.coindesk.com/api/) 下载。 这是 API 文档的一部分:
在本食谱中,我们将学习如何使用 RNN 预测未来的比特币价值。 关键思想是,过去观察到的值的时间顺序可以很好地预测未来的值。 对于此食谱,我们将使用 MIT 许可下的[这个页面](https://github.com/guillaume-chevalier/seq2seq-signal-prediction)上提供的代码。 给定时间间隔的比特币值通过 API 从[这里](https://www.coindesk.com/api/)下载。 这是 API 文档的一部分:
*We offer historical data from our Bitcoin Price Index through the following endpoint:* *https://api.coindesk.com/v1/bpi/historical/close.json* *By default, this will return the previous 31 days' worth of data. This endpoint accepts the following optional parameters:* *?index=[USD/CNY]The index to return data for. Defaults to USD.* *?currency=<VALUE>The currency to return the data in, specified in ISO 4217 format. Defaults to USD.* *?start=<VALUE>&end=<VALUE> Allows data to be returned for a specific date range. Must be listed as a pair of start and end parameters, with dates supplied in the YYYY-MM-DD format, e.g. 2013-09-01 for September 1st, 2013.* *?for=yesterday Specifying this will return a single value for the previous day. Overrides the start/end parameter.* *Sample Request:* [https://api.coindesk.com/v1/bpi/historical/close.json?start=2013-09-01&end=2013-09-05](https://api.coindesk.com/v1/bpi/historical/close.json?start=2013-09-01&end=2013-09-05) *Sample JSON Response:* {"bpi":{"2013-09-01":128.2597,"2013-09-02":127.3648,"2013-09-03":127.5915,"2013-09-04":120.5738,"2013-09-05":120.5333},"disclaimer":"This data was produced from the CoinDesk Bitcoin Price Index. BPI value data returned as USD.","time":{"updated":"Sep 6, 2013 00:03:00 UTC","updatedISO":"2013-09-06T00:03:00+00:00"}}