Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@levyfan
Copy link
Contributor

@levyfan levyfan commented May 24, 2019

fix #17

@levyfan levyfan requested a review from wrxDM May 24, 2019 08:14
@levyfan
Copy link
Contributor Author

levyfan commented May 24, 2019

@xuqiang

@levyfan levyfan merged commit 19e3e56 into zhihu:master May 27, 2019
@ghost
Copy link

ghost commented May 28, 2019

AdditionalOutputLayer.cpp

this->output_weights = static_cast<T *>(cuBERT::malloc(sizeof(T) * hidden_size));
cuBERT::memcpy(this->output_weights, output_weights, sizeof(T) * hidden_size, 1);

看着没有改, 看着还是有些问题

    if(output_weights != nullptr) {
        this->output_weights = static_cast<T *>(cuBERT::malloc(sizeof(T) * hidden_size * num_labels * max_batch_size));
        for (int i = 0; i < max_batch_size; ++i) {
            cuBERT::memcpy(this->output_weights + num_labels * hidden_size * i, output_weights, num_labels * hidden_size * sizeof(

T), 1);
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cubert是否支持多分类?

2 participants