Thu Mar 28 23:18:06 2024 montana(): python version: 3.10.12 keras version: 3.1.1 Neural network to solve a 1d regression problem. Find weights (a,b) so that the formula y = a x + b best approximates a set of (x,y) data. The data is read from internal functions. There are 100 pairs of (x,y) data for training. The resulting (a,b) are applied to 10 pairs of (x,y) test data. Training data shape: (100, 2) Test data shape: (10, 2) First 3 training items: [0.598499 0.60241 0.528659] First 3 training targets: [2.03206 2.44061 2.37146] Training the model: step 0: training cost = 2.94896 step 10: training cost = 2.39731 step 20: training cost = 2.00303 step 30: training cost = 1.71348 step 40: training cost = 1.49514 step 50: training cost = 1.32633 step 60: training cost = 1.19275 step 70: training cost = 1.08486 step 80: training cost = 0.996098 step 90: training cost = 0.921917 step 100: training cost = 0.859064 Testing the model: 1/1 ━━━━━━━━━━━━━━━━━━━━ 0s 48ms/step - loss: 0.4289 1/1 ━━━━━━━━━━━━━━━━━━━━ 0s 51ms/step - loss: 0.4289 Results: Test cost: 0.42890021204948425 Weights = [[1.810066]] Bias = [1.3694174] Graphics saved as "montana.png" montana(): Normal end of execution. Thu Mar 28 23:18:13 2024