Vote C2W1_Assignment AttributeError: ‘NoneType’ object has no attribute ‘datasets’

Please Reply

In 3 - Generate and Visualize Training Data Statistics

Exercise 1: Generate Training Statistics

AttributeError Traceback (most recent call last)
3 # get the number of features used to compute statistics
----> 4 print(f"Number of features used: {len(train_stats.datasets[0].features)}")
6 # check the number of examples used

AttributeError: ‘NoneType’ object has no attribute ‘datasets’

Hey friend! Your train_stats variable is either not declared before this point or the cell that declares it was not executed. Also, it’s possible that your notebook lost its context and you’ll just need to rerun the cells up to this point where the execution is failing.