When I run the course assignment notebook I get the following error on the third cell
TypeError Traceback (most recent call last)
in
16 assert test_output.std() < 0.65
17
—> 18 test_gen_block(25, 12)
19 test_gen_block(15, 28)
in test_gen_block(in_features, out_features, num_test)
1 # Verify the generator block function
2 def test_gen_block(in_features, out_features, num_test=1000):
----> 3 block = get_generator_block(in_features, out_features)
4
5 # Check the three parts
in get_generator_block(input_dim, output_dim)
17 # torch.nn — PyTorch 1.10 documentation.
18 #### START CODE HERE ####
—> 19 nn.Linear(None, None),
20 nn.BatchNorm1d(None),
21 #### END CODE HERE ####
/usr/local/lib/python3.6/dist-packages/torch/nn/modules/linear.py in init(self, in_features, out_features, bias)
70 self.in_features = in_features
71 self.out_features = out_features
—> 72 self.weight = Parameter(torch.Tensor(out_features, in_features))
73 if bias:
74 self.bias = Parameter(torch.Tensor(out_features))
TypeError: new() received an invalid combination of arguments - got (NoneType, NoneType), but expected one of:
- (torch.device device)
- (torch.Storage storage)
- (Tensor other)
- (tuple of ints size, torch.device device)
didn’t match because some of the arguments have invalid types: (!NoneType!, !NoneType!) - (object data, torch.device device)
didn’t match because some of the arguments have invalid types: (!NoneType!, !NoneType!)
Is fixing it part of the assignment?