我正在研究GitHub上的手语识别https://github.com/udacity/AIND-Recognize。在
我有一个关于型号选择的问题。 当我在那里管理这个牢房的时候
import warnings
from hmmlearn.hmm import GaussianHMM
def train_a_word(word, num_hidden_states, features):
warnings.filterwarnings("ignore", category=DeprecationWarning)
training = asl.build_training(features)
X, lengths = training.get_word_Xlengths(word)
model = GaussianHMM(n_components=num_hidden_states, n_iter=1000).fit(X, lengths)
logL = model.score(X, lengths)
return model, logL
demoword = 'BOOK'
model, logL = train_a_word(demoword, 3 , features=features_ground)
print("Number of states trained in model for {} is {}".format(demoword, model.n_components))
print("logL = {}".format(logL))
这个错误:
^{pr2}$我想不通,我想说的是,我们不应该修改这个单元格。在
尝试更新依赖项,尤其是hmmlearn和scikit learn。 您可以在这里找到完整的项目供将来参考: https://github.com/llSeedll/Udacity-AIND/tree/master/Project%204%20-%20ASLRecognizer
问题是你的线路引起的
解决问题:
将
fit(X, lengths)
更改为fit(X, lengths=lengths)
See the ^{} documentation
A possibly helpful answer about arguments
相关问题 更多 >
编程相关推荐