hw1/src/part2.py
was updated at 7pm on Friday 11 October
and at 2pm on Tuesday 15 October (hw1.zip
was also updated).
Changes made at 7pm on Friday 11 October:
114d113 < cost = 0 120c119 < cost += model.loss(output, y) --- > cost = model.loss(output, y) 132c131 < print(f" Cost: {cost/len(inputs):.2f} Accuracy: {num_correct / len(inputs) * 100:.2f}%") --- > print(f" Cost: {cost:8.6f} Accuracy: {num_correct / len(inputs) * 100}%")When the code is run, the new version correctly prints the average of the loss function at each epoch. You are encouraged to either download the new version, or to mirror the changes in your own code (although, it will not make any difference to the automarking).
Changes made at 2pm on Tuesday 15 October:
75c75 < dE/ds = z - t (which is passed in as diff) --- > -dE/ds = t - z (which is passed in as diff)This is a change in the comments, which now correctly specifies the sign of the diff parameter.