English 中文(简体)
How to Properly Configure an LSTM with a Linearosphere for Wake Word Researchion
原标题:How to Properly Configure an LSTM with a Linear Layer for Wake Word Detection

我正在为我的助手开发一个字灯模型。 我的模型结构包括一个微型、小型、小型和中型终端层,处理音频数据,然后是线性地层。 然而,Im正面临线电视界出乎意料的产出,造成混乱。

在将微额信贷额度的产出(星号:4,32,32)通过后,我预计产出将达到(4,32,1)。 然而,实际产出形态为(4、32、1)。

In my binary classification task, I aim to distinguish between two classes: 0 for "do not wake up" and 1 for "wake up the AI." My batch size is 32, and I anticipated the output to be in the shape (32, 1) to represent one prediction for each audio MFCC input.

能否就“线性”的正确配置或实现预期产出形态所需的任何处理步骤(32,1)向某人提供咨询意见? 任何见解或守则实例都会受到高度赞赏。

问题回答

Not quite. You need to reshape your data to (32, 1) or (1, 32) in order for your linear layer to work. You can achieve this by adding a dimension with torch.unsqueeze() or even directly with torch.view(). If you use the unsqueeze function, the new shape should be (32, 1). If you use the view function, the new shape should be (1, 32).





相关问题
Can Django models use MySQL functions?

Is there a way to force Django models to pass a field to a MySQL function every time the model data is read or loaded? To clarify what I mean in SQL, I want the Django model to produce something like ...

An enterprise scheduler for python (like quartz)

I am looking for an enterprise tasks scheduler for python, like quartz is for Java. Requirements: Persistent: if the process restarts or the machine restarts, then all the jobs must stay there and ...

How to remove unique, then duplicate dictionaries in a list?

Given the following list that contains some duplicate and some unique dictionaries, what is the best method to remove unique dictionaries first, then reduce the duplicate dictionaries to single ...

What is suggested seed value to use with random.seed()?

Simple enough question: I m using python random module to generate random integers. I want to know what is the suggested value to use with the random.seed() function? Currently I am letting this ...

How can I make the PyDev editor selectively ignore errors?

I m using PyDev under Eclipse to write some Jython code. I ve got numerous instances where I need to do something like this: import com.work.project.component.client.Interface.ISubInterface as ...

How do I profile `paster serve` s startup time?

Python s paster serve app.ini is taking longer than I would like to be ready for the first request. I know how to profile requests with middleware, but how do I profile the initialization time? I ...

Pragmatically adding give-aways/freebies to an online store

Our business currently has an online store and recently we ve been offering free specials to our customers. Right now, we simply display the special and give the buyer a notice stating we will add the ...

Converting Dictionary to List? [duplicate]

I m trying to convert a Python dictionary into a Python list, in order to perform some calculations. #My dictionary dict = {} dict[ Capital ]="London" dict[ Food ]="Fish&Chips" dict[ 2012 ]="...

热门标签