I keep getting an assertion error when trying to train the model
Error : InvalidArgumentError: assertion failed: [Labels must be <= n_classes - 1] [Condition x <= y did not hold element-wise:] [x (head/losses/Cast:0) = ] [[10702.6396][1242.82][3704.35]…] [y (head/losses/check_label_range/Const:0) = ] [1]
[[{{node Assert}}]]
Link :
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36.
Challenge: Linear Regression Health Costs Calculator
Welcome to the forums @hichammazouzi120. It looks like you posted the link to the boilerplate notebook and not yours. If you post yours, I’ll have a look.
where you are using a linear classifier, which sorts input into different groups, instead of a regression which computes a value (health care cost in this case) from inputs (the other data), So you need to use a regression model; you can follow and adapt the tf fuel efficiciency tutorial for this project.