<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[RuntimeError: expand(torch.DoubleTensor{[694, 6]}, size=[694]): the number of sizes provided (1) must be greater or equal to the number of dimensions in the tensor (2)]]></title><description><![CDATA[<p dir="auto">Hello,</p>
<p dir="auto">I am cloning the Q18 neural network example (LSTM) and running it. I noticed that when I leave the get_features function with only 1 feature, the model runs normally<br />
<img src="/community/assets/uploads/files/1709394442235-screenshot-2024-03-02-224511.png" alt="Screenshot 2024-03-02 224511.png" class="img-responsive img-markdown" /><br />
I plan to use more features as follows:<br />
<img src="/community/assets/uploads/files/1709394472427-screenshot-2024-03-02-224556.png" alt="Screenshot 2024-03-02 224556.png" class="img-responsive img-markdown" /><br />
And got the following error<br />
<img src="/community/assets/uploads/files/1709394541361-ea046276-cbba-4947-b5f6-d2b667c1ad0f-image.png" alt="ea046276-cbba-4947-b5f6-d2b667c1ad0f-image.png" class="img-responsive img-markdown" /><br />
<img src="/community/assets/uploads/files/1709394558088-65f0558a-daeb-456c-a6b8-4622d12f1c96-image.png" alt="65f0558a-daeb-456c-a6b8-4622d12f1c96-image.png" class="img-responsive img-markdown" /><br />
<img src="/community/assets/uploads/files/1709394601700-screenshot-2024-03-02-224947.png" alt="Screenshot 2024-03-02 224947.png" class="img-responsive img-markdown" /></p>
<p dir="auto">Please show me how to fix the error so that I can apply more features. I only edited the get_features function, all the remaining code is the same as the Q18 neural network example</p>
<p dir="auto">Please help me. Thank you so much.</p>
]]></description><link>http://quantiacs.com/community/topic/529/runtimeerror-expand-torch-doubletensor-694-6-size-694-the-number-of-sizes-provided-1-must-be-greater-or-equal-to-the-number-of-dimensions-in-the-tensor-2</link><generator>RSS for Node</generator><lastBuildDate>Mon, 07 Sep 2026 18:47:01 GMT</lastBuildDate><atom:link href="http://quantiacs.com/community/topic/529.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 02 Mar 2024 15:51:29 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to RuntimeError: expand(torch.DoubleTensor{[694, 6]}, size=[694]): the number of sizes provided (1) must be greater or equal to the number of dimensions in the tensor (2) on Sun, 10 Mar 2024 15:22:08 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://quantiacs.com/community/uid/12">@support</a> Thank you so much. I have resolved this error</p>
]]></description><link>http://quantiacs.com/community/post/1453</link><guid isPermaLink="true">http://quantiacs.com/community/post/1453</guid><dc:creator><![CDATA[illustrious.felice]]></dc:creator><pubDate>Sun, 10 Mar 2024 15:22:08 GMT</pubDate></item><item><title><![CDATA[Reply to RuntimeError: expand(torch.DoubleTensor{[694, 6]}, size=[694]): the number of sizes provided (1) must be greater or equal to the number of dimensions in the tensor (2) on Sun, 10 Mar 2024 15:06:25 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://quantiacs.com/community/uid/2784">@illustrious-felice</a> It looks like your feature is prepared in a way that the computation of a log with argument zero is involved, which triggers an error. You need to handle this case, for example with a try/except clause.</p>
]]></description><link>http://quantiacs.com/community/post/1452</link><guid isPermaLink="true">http://quantiacs.com/community/post/1452</guid><dc:creator><![CDATA[support]]></dc:creator><pubDate>Sun, 10 Mar 2024 15:06:25 GMT</pubDate></item><item><title><![CDATA[Reply to RuntimeError: expand(torch.DoubleTensor{[694, 6]}, size=[694]): the number of sizes provided (1) must be greater or equal to the number of dimensions in the tensor (2) on Mon, 04 Mar 2024 12:52:12 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://quantiacs.com/community/uid/2784">@illustrious-felice</a> Please help me fix this error. <a class="plugin-mentions-user plugin-mentions-a" href="http://quantiacs.com/community/uid/12">@support</a> <a class="plugin-mentions-user plugin-mentions-a" href="http://quantiacs.com/community/uid/5">@Vyacheslav_B</a></p>
]]></description><link>http://quantiacs.com/community/post/1431</link><guid isPermaLink="true">http://quantiacs.com/community/post/1431</guid><dc:creator><![CDATA[illustrious.felice]]></dc:creator><pubDate>Mon, 04 Mar 2024 12:52:12 GMT</pubDate></item></channel></rss>