Skip to content

Commit

Permalink
[Core] Fix a bug with fused conv2d (#2270)
Browse files Browse the repository at this point in the history
BUG

- Fix a bug with activation being passed as null. (Happens from the layers side)
- Fix CI settings to reduce flakiness:
  - Lock Chrome to 67.0 on Windows to fix the WebGL problem on latest Chrome
  - Double the jasmine timeout from 5s to 10s to give us breathing room since sometimes tests in Windows take 5.1-5.3 secs
  • Loading branch information
dsmilkov authored Oct 25, 2019
1 parent cfa6a90 commit 0e8b919
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tfjs-core/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,9 @@ module.exports = function(config) {
win_10_chrome: {
base: 'BrowserStack',
browser: 'chrome',
browser_version: 'latest',
// Latest Chrome on Windows has WebGL problems:
// https://github.com/tensorflow/tfjs/issues/2272
browser_version: '77.0',
os: 'Windows',
os_version: '10'
},
Expand Down
4 changes: 4 additions & 0 deletions tfjs-core/src/jasmine_util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,15 @@
* limitations under the License.
* =============================================================================
*/

// tslint:disable-next-line:no-require-imports
const jasmine = require('jasmine');
import {KernelBackend} from './backends/backend';
import {ENGINE} from './engine';
import {env, Environment, Flags} from './environment';

Error.stackTraceLimit = Infinity;
jasmine.DEFAULT_TIMEOUT_INTERVAL = 10000;

export type Constraints = {
flags?: Flags,
Expand Down
1 change: 1 addition & 0 deletions tfjs-core/src/ops/fused_ops.ts
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,7 @@ function conv2d_<T extends Tensor3D|Tensor4D>({
activation?: Activation,
preluActivationWeights?: Tensor
}): T {
activation = activation || 'linear';
if (shouldFuse(ENGINE.state.gradientDepth, activation) === false) {
let result = unfusedConv2d(
x, filter, strides, pad, dataFormat, dilations, dimRoundingMode);
Expand Down

0 comments on commit 0e8b919

Please sign in to comment.