From 14e37b1201363e50080254d5cfa0835b129d7805 Mon Sep 17 00:00:00 2001 From: Yannick Assogba Date: Mon, 21 Sep 2020 17:42:35 -0400 Subject: [PATCH] fix g3 lint errors --- .../src/layers/convolutional_recurrent.ts | 17 ++++++++++++++--- .../src/layers/convolutional_recurrent_test.ts | 10 ++++++++++ 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/tfjs-layers/src/layers/convolutional_recurrent.ts b/tfjs-layers/src/layers/convolutional_recurrent.ts index 5c298904454..5b0ff248b75 100644 --- a/tfjs-layers/src/layers/convolutional_recurrent.ts +++ b/tfjs-layers/src/layers/convolutional_recurrent.ts @@ -1,3 +1,13 @@ +/** + * @license + * Copyright 2020 Google LLC + * + * Use of this source code is governed by an MIT-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/MIT. + * ============================================================================= + */ + import * as tfc from '@tensorflow/tfjs-core'; import {Tensor, util} from '@tensorflow/tfjs-core'; @@ -339,10 +349,10 @@ export class ConvLSTM2DCell extends LSTMCell implements ConvRNN2DCell { assertPositiveInteger(this.filters, 'filters'); this.kernelSize = normalizeArray(kernelSize, 2, 'kernelSize'); - this.kernelSize.map(size => assertPositiveInteger(size, 'kernelSize')); + this.kernelSize.forEach(size => assertPositiveInteger(size, 'kernelSize')); this.strides = normalizeArray(strides || 1, 2, 'strides'); - this.strides.map(stride => assertPositiveInteger(stride, 'strides')); + this.strides.forEach(stride => assertPositiveInteger(stride, 'strides')); this.padding = padding || 'valid'; checkPaddingMode(this.padding); @@ -351,7 +361,8 @@ export class ConvLSTM2DCell extends LSTMCell implements ConvRNN2DCell { checkDataFormat(this.dataFormat); this.dilationRate = normalizeArray(dilationRate || 1, 2, 'dilationRate'); - this.dilationRate.map(rate => assertPositiveInteger(rate, 'dilationRate')); + this.dilationRate.forEach( + rate => assertPositiveInteger(rate, 'dilationRate')); } public build(inputShape: Shape|Shape[]): void { diff --git a/tfjs-layers/src/layers/convolutional_recurrent_test.ts b/tfjs-layers/src/layers/convolutional_recurrent_test.ts index 5671be1a422..9e1026d336f 100644 --- a/tfjs-layers/src/layers/convolutional_recurrent_test.ts +++ b/tfjs-layers/src/layers/convolutional_recurrent_test.ts @@ -1,4 +1,14 @@ +/** + * @license + * Copyright 2020 Google LLC + * + * Use of this source code is governed by an MIT-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/MIT. + * ============================================================================= + */ + import * as tfc from '@tensorflow/tfjs-core'; import {sequential} from '../exports';