New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cleanup conv class definitions #6947
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks!
@@ -706,7 +706,6 @@ serialization.registerClass(Conv3D); | |||
export class Conv2DTranspose extends Conv2D { | |||
/** @nocollapse */ | |||
static className = 'Conv2DTranspose'; | |||
inputSpec: InputSpec[]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch. Note to other reviewer: This is declared in the Layer
interface in src/engine/topology.ts
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you Matt!
@@ -116,7 +116,7 @@ class ConvRNN2D extends RNN { | |||
/** @nocollapse */ | |||
static className = 'ConvRNN2D'; | |||
|
|||
readonly cell: ConvRNN2DCell; | |||
declare readonly cell: ConvRNN2DCell; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch here as well. cell
is already a property of RNN
, so declare
is required here to assert its new type. I'm not completely sure why this didn't throw an error when compiling with Bazel.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
with
tfjs
4.0 its almost there to a clean build using standardtsc
few minor cleanups:
Conv2DTranspose
andConv3DTranspose
unnecessarily redeclareinputSpec
when its already declared in parent classConvRNN2D
redeclarescell
with a different type than parent class, but without explicit declarationcc @mattsoulanille - can you take a look since you've done most of the work for
typescript
upgrade?This change is