Autograder [Mon Apr 6 02:26:02 2020]: Received job 11785-s20_hw4p1_10_agadhika@andrew.cmu.edu:580 Autograder [Mon Apr 6 02:26:22 2020]: Success: Autodriver returned normally Autograder [Mon Apr 6 02:26:22 2020]: Here is the output from the autograder: --- Autodriver: Job exited with status 0 mkdir -p handin tar xf handin.tar -C handin tar xf autograde.tar #pip3 freeze AUTOLAB=1 /usr/local/depot/anaconda3/bin/python3 autograde/runner.py --module-path=./handin/ FYour mean NLL for predicting a single word: 5.127223014831543 . =================================== FAILURES =================================== _______________________________ test_generation ________________________________ def test_generation(): inp = np.load(fixture_path('generation.npy')) forward = 10 n = inp.shape[0] t = inp.shape[1] pred = np.load(handin_path('generated_logits.npy')) assert pred.shape[0] == n assert pred.shape[1] == forward ninp = np.concatenate((inp, pred), axis=1) vocab = np.load(fixture_path('vocab.npy')) model = Model(vocab.shape[0], args=prediction_args) model.load_state_dict(load_from_numpy(read_chunks(fixture_path('model-00000099.tar.npy.{}')))) model.eval() state = model.zero_state(n) x = Variable(torch.from_numpy(ninp.T)).long() > logits, rnn_hs = model(x, state) autograde/tests/test_generation.py:229: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/depot/anaconda3/lib/python3.5/site-packages/torch/nn/modules/module.py:210: in __call__ result = self.forward(*input, **kwargs) autograde/tests/test_generation.py:183: in forward embedded = self.embedding(input) /usr/local/depot/anaconda3/lib/python3.5/site-packages/torch/nn/modules/module.py:210: in __call__ result = self.forward(*input, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = DropoutEmbedding ( (embedding): Embedding(33278, 400) ) input = Variable containing: 8881 1419 19288 ... 29011 122 31891 12851 11568 79 ... 22968 79 19084 ...19 22968 ... 25821 17549 1423 1419 79 14658 ... 31353 33005 88 [torch.LongTensor of size 40x128] def forward(self, input): if self.training and self.p > 0: mask = Variable( self.embedding.weight.data .new(self.embedding.weight.size(0), 1) .bernoulli_(1. - self.p) ) # .expand_as(self.embedding.weight) masked_weight = (self.embedding.weight * mask) / (1. - self.p) else: masked_weight = self.embedding.weight padding_idx = self.embedding.padding_idx if padding_idx is None: padding_idx = -1 > return self.embedding._backend.Embedding.apply( input, masked_weight, padding_idx, self.embedding.max_norm, self.embedding.norm_type, self.embedding.scale_grad_by_freq, self.embedding.sparse ) E AttributeError: type object 'Embedding' has no attribute 'apply' autograde/tests/test_generation.py:153: AttributeError Run time: 2.818155527114868 {"scores": {"Prediction": 50.0, "Generation": 0.0}} #AUTOLAB=1 python3 autograde/runner.py --module-path=./handin/