02-transformery.ipynb - output from model only strings 'last_hidden_state', 'pooler_output'
Running in NVIDIA Docker Container: nvcr.io/nvidia/pytorch:20.11-py3
Pytorch version: 1.8.0a0+17f8c32
transformers version: 4.0.0-rc-1
Python version: 3.6.10 |Anaconda, Inc.| (default, May  8 2020, 02:54:21)  [GCC 7.3.0]

When running through transformers/notebooks/02-transformers.ipynb, I see the following output at this point:

```python
outputs, pooled = model(tokens_pt)
print("Token wise output: {}, Pooled output: {}".format(outputs.shape, pooled.shape))
```
output for this part:
```
AttributeError                            Traceback (most recent call last)
<ipython-input-47-cda4654dfa83> in <module>
     20 #outputs = model_outs[0]
     21 #pooled = model_outs[1]
---> 22 print("Token wise output: {}, Pooled output: {}".format(outputs.shape, pooled.shape))

AttributeError: 'str' object has no attribute 'shape'
```

This is because the values of `outputs` and `pooled` are strings, `"last_hidden_state"` and "pooler_output", respectively. 
However, the following change (comment out original line and replace it with version where `model` output is captured in a single object whose 0 and 1 indices are accessed) produces the desired result:

```
#outputs, pooled = model(tokens_pt)
model_outs = model(tokens_pt)
outputs = model_outs[0]
pooled = model_outs[1]
print("Token wise output: {}, Pooled output: {}".format(outputs.shape, pooled.shape))
```

I am not sure if this is a PyTorch version thing or what, but was hoping to either get some insight or alert you to something coming up when upgrading to the latest pytorch. Thank you.
Exactly same issue while using transformers. I'm using Pytorch 1.7. The solution presented solved the issue