Developer chat


Fixed in master.

(Pierre Guillou) #799

Thanks Sylvain. I changed in my local lib the fastai/ file but now I got another error:

AttributeError: 'list' object has no attribute 'parameters'


Facing the same issue in colab:
name ‘split_bn_bias’ is not defined


I have no idea where this one comes from, I’ll need a reproducible example to fix it.

(Pierre Guillou) #802

(I’m using fastai 1.0.45 on Windows 10) The error appears when I run the lesson7-wgan.ipynb notebook.


I am using Google Colab and installed the library using
In the notebook lesson7-superres-gan.ipynb, following error is thrown while calling fit() on GANLearner:

(Stas Bekman) #804

I think learn.get_preds() isn’t CLI friendly. it sends \r which impacts user’s console outputs. For example, this test we have:

def test_get_preds():
    learn = fake_learner()
    a = learn.get_preds()
    assert == len(a[1])

was resulting in the test name disappearing (see the first PASSED is lacking its name?)

collected 3 items                                                                                                                                                          

tests/ PASSED
tests/ PASSED

I had to capture its stdout to fix that:

def test_get_preds():
    learn = fake_learner()
    with CaptureStdout() as cs:
        a = learn.get_preds()
    assert == len(a[1])

now we get:

collected 3 items

tests/ PASSED
tests/ PASSED
tests/ PASSED

but perhaps it’s ok and we just need to document this side effect and how to overcome it?


Ok, I was stupid with my first fix, now it’s really fixed on master.
@nandakumar212 fixed on master means you won’t have the fix in colab until the next release, unless you do a dev install.

Lesson 7 further discussion ✅
(Pierre Guillou) #806

Sylvain, many thanks. The lesson7-wgan.ipynb notebook works well now in master with your change in fastai/

(Vu Ha) #807

I was running into issue while experimenting with object detection models. None of the methods Learner.predict, Learner.pred_batch, Learner.get_preds works. The one method that works is Learner.show_results. I saw a TODO by Jeremy back in December about refactoring the code there to work with pred_batch(reconstruct=True). The use of attaching RecordOnCPU callback to capture the input and target is also rather unintuitive to follow. Is there any new thinking/progress on this? (I have to admit, the library’s intricate design is powerful but also quite formidable for a newcomer to grok. Awesome work and kudos nevertheless!)


Yes, making object detection work end to end is on our TODO and will be done before the second part of the course begins, but it probably won’t fully work right now. I’d stick with calling the models explicitly for now, until we have sorted this out.

(Andrij David) #809

I have written a MultiTask API for one of my projects. It extends the DataBlock Api. I don’t know if it worths to add it to the library.


That looks very nice! It may be a bit specific to be included in fastai, but we can definitely link to it with other examples of custom ItemList or custom model definitions.


Finally, text in mixed precision is debugged and I can properly train an AWD-LSTM in mixed precision. QRNNs don’t support mixed-precision training however.
Haven’t tried Transformer and TransformerWL but there is no reason it shouldn’t work.

(benedikt herudek) #812

@sgugger will you record that, share slides?

Actually, it was an area that looked interesting and complex, so would be cool. Maybe even a summary in the docs at some point based on what you share

(Stas Bekman) #813

Please have a look at:

and give us feedback. This just came out.


I’ll share what I can, yes.

(Kaspar Lund) #815

would be really usefull for tranformerxl - it really used a lot of gpu mem


hi, @deena-b i get the same issue, have you solved it ?

(Kaspar Lund) #817

looks like tranformerXL is cpu bound - my cpu utilization is higher than the gpu utilization. Is that also your experience @sgugger