mirror of
https://github.com/lordmathis/CUDANet.git
synced 2025-11-06 17:54:27 +00:00
Fix bin file seek offset
This commit is contained in:
@@ -110,7 +110,7 @@ void Model::loadWeights(const std::string& path) {
|
||||
for (const auto& tensorInfo : tensorInfos) {
|
||||
std::vector<float> values(tensorInfo.size);
|
||||
|
||||
file.seekg(tensorInfo.offset);
|
||||
file.seekg(sizeof(int64_t) + header.size() + tensorInfo.offset);
|
||||
file.read(reinterpret_cast<char*>(values.data()), tensorInfo.size * sizeof(float));
|
||||
|
||||
if (layerMap.find(tensorInfo.name) != layerMap.end()) {
|
||||
|
||||
Reference in New Issue
Block a user