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

Lab3, Part1: ValueError: too many values to unpack (expected 2) #125

Open
jeffreydiament95 opened this issue May 10, 2023 · 3 comments
Open

Comments

@jeffreydiament95
Copy link

When running the source code without any modifications, I get the following error:

ValueError Traceback (most recent call last)
in <cell line: 4>()
2
3 # Call the risk-aware model to generate scores
----> 4 predictions, bias = bias_wrapped_dense_NN(x_test)
5
6 # Visualize the relationship between the input data x and the bias

ValueError: too many values to unpack (expected 2)

Screen Shot 2023-05-09 at 5 53 14 PM
@jeffreydiament95 jeffreydiament95 changed the title Lab3, Part1 Lab3, Part1: ValueError: too many values to unpack (expected 2) May 10, 2023
@Spartanzhao
Copy link

I got the sample issue, I don't make sense why? this software upgraded?

@fractalclockwork
Copy link

fractalclockwork commented May 13, 2023

There appears to have been an API change to HistogramWrapper. It's Return type is now a capsa.RiskTensor containing both the predicted y_hat (tf.Tensor) and the bias value for each input sample (tf.Tensor).

Here want I did to fix up the code...

# Call the risk-aware model to generate scores
#predictions, bias = bias_wrapped_dense_NN(x_test)
prediction = bias_wrapped_dense_NN(x_test)
bias = prediction.bias  # fix up

@Spartanzhao
Copy link

I'll take a try, thanks.

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

No branches or pull requests

3 participants