Skip to content

OMLT Main Example: Pyomo build_formation function fails #127

Answered by bammari
bspiveyxom asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @bspiveyxom. Thank you for your comment. It seems that your neural network takes in 8 inputs but your scaled_input_bounds dictionary and your scaling object specify information for only 1 variable. For example, if you have the same mean, std_dev, and bounds for all 8 input variables, try:

inputs_to_nn = 8

scaler = OffsetScaling(offset_inputs=[scale_x[0] for i in range(inputs_to_nn)], factor_inputs=[scale_x[1] for i in range(inputs_to_nn)], offset_outputs=[scale_y[0]], factor_outputs=[scale_y[1]])

scaled_input_bounds = {i: (0, 5) for i in range(inputs_to_nn)}

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@bammari
Comment options

Answer selected by bammari
@bspiveyxom
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants