d2l-ai / d2l-en

Interactive deep learning book with multi-framework code, math, and discussions. Adopted at 500 universities from 70 countries including Stanford, MIT, Harvard, and Cambridge.
https://D2L.ai
Other
23.24k stars 4.27k forks source link

FIXME that should be fixed #1216

Closed astonzhang closed 4 years ago

astonzhang commented 4 years ago
terrytangyuan commented 4 years ago

Could you clarify? Currently the implementation of MySequential does not use Sequential.

class MySequential(tf.keras.Model):
    def __init__(self, *args):
        super().__init__()
        self.modules = []
        for block in args:
            # Here, `block` is an instance of a `tf.keras.layers.Layer`
            # subclass
            self.modules.append(block)

    def call(self, x):
        for module in self.modules:
            x = module(x)
        return x
astonzhang commented 4 years ago

It seems that this FIXME is added by Mu. @mli, shall we update this FIXME?

terrytangyuan commented 4 years ago

Yes this has been resolved before our announcement of TF implementation. Where did you see the FIXME?

astonzhang commented 4 years ago

Just click the link and turn on tf tab, ctrl + F "FIXME".