Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix b1c6nbt model invalid mid_num_channels setting. #976

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

b05902062
Copy link

Issue

When running b1c6nbt with c++ engine, it will trigger this error.
terminate called after throwing an instance of 'StringError' what(): Error loading or parsing model file /b1c6nbt-s31704192-d83750556/model.bin.gz: trunk: all numbers of channels must be positive

trunk exported here

def write_trunk(name,model):
writeln("trunk")
writeln(len(model.blocks))
writeln(model.c_trunk)
writeln(model.c_mid)
writeln(model.c_mid-model.c_gpool)
writeln(model.c_gpool)
writeln(model.c_gpool)

Error thrown here

TrunkDesc::TrunkDesc(istream& in, int vrsn, bool binaryFloats) {
in >> name;
version = vrsn;
in >> numBlocks;
in >> trunkNumChannels;
in >> midNumChannels;
in >> regularNumChannels;
int dilatedNumChannels; //unused
in >> dilatedNumChannels;
in >> gpoolNumChannels;

if(in.fail())
throw StringError(name + ": trunk failed to parse num blocks or various channel parameters");
if(numBlocks < 1)
throw StringError(name + ": trunk num blocks must be positive");
if(
trunkNumChannels <= 0 || midNumChannels <= 0 || regularNumChannels <= 0 ||
gpoolNumChannels <= 0)
throw StringError(name + ": all numbers of channels must be positive");

@b05902062
Copy link
Author

Probably a typo. 6 is more consistent with others' config.

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.

1 participant