diff --git a/demos/benchmarks/math-benchmark-run-groups.ts b/demos/benchmarks/math-benchmark-run-groups.ts index ded2645974..1c4fe6efe9 100644 --- a/demos/benchmarks/math-benchmark-run-groups.ts +++ b/demos/benchmarks/math-benchmark-run-groups.ts @@ -25,7 +25,8 @@ import * as mulmat_gpu_benchmark from './mulmat_gpu_benchmark'; export const BENCHMARK_RUN_GROUPS: BenchmarkRunGroup[] = [ { name: - 'Matrix Multiplication (CPU vs GPU): matmul([size, size], [size, size])', + 'Matrix Multiplication (CPU vs GPU): ' + + 'matmul([size, size], [size, size])', min: 0, max: 1024, stepSize: 64, @@ -70,7 +71,8 @@ export const BENCHMARK_RUN_GROUPS: BenchmarkRunGroup[] = [ stepSize: 64, stepToSizeTransformation: (step: number) => Math.max(1, step), benchmarkRuns: [ - new BenchmarkRun('logsumexp_gpu', logsumexp_gpu_benchmark.BENCHMARK_TEST), + new BenchmarkRun( + 'logsumexp_gpu', logsumexp_gpu_benchmark.BENCHMARK_TEST), new BenchmarkRun('logsumexp_cpu', logsumexp_cpu_benchmark.BENCHMARK_TEST) ], } diff --git a/demos/benchmarks/max_pool_backprop_gpu_benchmark.ts b/demos/benchmarks/max_pool_backprop_gpu_benchmark.ts index 7dab36b3d0..82076e06dd 100644 --- a/demos/benchmarks/max_pool_backprop_gpu_benchmark.ts +++ b/demos/benchmarks/max_pool_backprop_gpu_benchmark.ts @@ -15,6 +15,7 @@ limitations under the License. import * as conv_util from '../../src/math/conv_util'; import {GPGPUContext} from '../../src/math/webgl/gpgpu_context'; +// tslint:disable-next-line:max-line-length import * as max_pool_backprop_gpu from '../../src/math/webgl/max_pool_backprop_gpu'; import * as test_util from '../../src/test_util'; import * as util from '../../src/util'; @@ -79,4 +80,4 @@ export const BENCHMARK_TEST: BenchmarkTest = (size: number) => { gpgpu.dispose(); return avgTime; -}; \ No newline at end of file +}; diff --git a/demos/homepage/index.ts b/demos/homepage/index.ts index e3d09e1bef..289df01815 100644 --- a/demos/homepage/index.ts +++ b/demos/homepage/index.ts @@ -30,6 +30,7 @@ function isSafari() { function isMobile() { // tslint:disable-next-line:no-any const a = navigator.userAgent||navigator.vendor||(window as any).opera; + // tslint:disable-next-line:max-line-length return /(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0,4)); } diff --git a/demos/imagenet/imagenet-demo.ts b/demos/imagenet/imagenet-demo.ts index 3c8a9f9890..c0cadad966 100644 --- a/demos/imagenet/imagenet-demo.ts +++ b/demos/imagenet/imagenet-demo.ts @@ -15,21 +15,23 @@ limitations under the License. import '../demo-header'; import '../demo-footer'; +// tslint:disable-next-line:max-line-length import {gpgpu_util, GPGPUContext, NDArrayMathCPU, NDArrayMathGPU} from '../deeplearnjs'; import * as imagenet_util from '../models/imagenet_util'; import {SqueezeNet} from '../models/squeezenet'; import {PolymerElement, PolymerHTMLElement} from '../polymer-spec'; // tslint:disable-next-line:variable-name -export const ImagenetDemoPolymer: new () => PolymerHTMLElement = PolymerElement({ - is: 'imagenet-demo', - properties: { - layerNames: Array, - selectedLayerName: String, - inputNames: Array, - selectedInputName: String - } -}); +export const ImagenetDemoPolymer: new () => PolymerHTMLElement = + PolymerElement({ + is: 'imagenet-demo', + properties: { + layerNames: Array, + selectedLayerName: String, + inputNames: Array, + selectedInputName: String + } + }); /** * NOTE: To use the webcam without SSL, use the chrome flag: diff --git a/demos/intro/intro.ts b/demos/intro/intro.ts index 127bf7b02a..4292b9d452 100644 --- a/demos/intro/intro.ts +++ b/demos/intro/intro.ts @@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ - +// tslint:disable-next-line:max-line-length import {NDArrayMathGPU, Scalar, Array1D, Array2D, Graph, Session, SGDOptimizer, InCPUMemoryShuffledInputProviderBuilder, FeedEntry, CostReduction} from '../deeplearnjs'; // This file parallels (some of) the code in the introduction tutorial. diff --git a/demos/mnist/mnist.ts b/demos/mnist/mnist.ts index 3e483cdb18..1ee9e76097 100644 --- a/demos/mnist/mnist.ts +++ b/demos/mnist/mnist.ts @@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ - +// tslint:disable-next-line:max-line-length import {Array1D, Array2D, CheckpointLoader, Graph, NDArray, NDArrayInitializer, NDArrayMath, NDArrayMathGPU, Scalar, Session, Tensor} from '../deeplearnjs'; // manifest.json lives in the same directory as the mnist demo. diff --git a/demos/model-builder/layer_builder.ts b/demos/model-builder/layer_builder.ts index 7cf088b8ab..c7061f6a4f 100644 --- a/demos/model-builder/layer_builder.ts +++ b/demos/model-builder/layer_builder.ts @@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ - +// tslint:disable-next-line:max-line-length import {Array1D, Array2D, Array4D, conv_util, Graph, Initializer, NDArray, NDArrayInitializer, Tensor, util, VarianceScalingInitializer, ZerosInitializer} from '../deeplearnjs'; /** diff --git a/demos/model-builder/model-builder.ts b/demos/model-builder/model-builder.ts index 9c3de4db24..7f0e175ea5 100644 --- a/demos/model-builder/model-builder.ts +++ b/demos/model-builder/model-builder.ts @@ -20,7 +20,7 @@ import '../demo-header'; import '../demo-footer'; import {PolymerElement, PolymerHTMLElement} from '../polymer-spec'; - +// tslint:disable-next-line:max-line-length import {Array1D, Array3D, DataStats, FeedEntry, Graph, GraphRunner, GraphRunnerEventObserver, InCPUMemoryShuffledInputProviderBuilder, InMemoryDataset, MetricReduction, NDArray, NDArrayMath, NDArrayMathCPU, NDArrayMathGPU, Optimizer, Scalar, Session, SGDOptimizer, Tensor, util} from '../deeplearnjs'; import {NDArrayImageVisualizer} from '../ndarray-image-visualizer'; import {NDArrayLogitsVisualizer} from '../ndarray-logits-visualizer'; diff --git a/demos/model-builder/tensorflow.ts b/demos/model-builder/tensorflow.ts index 11a02bb8d2..dad7eb8b4d 100644 --- a/demos/model-builder/tensorflow.ts +++ b/demos/model-builder/tensorflow.ts @@ -13,6 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ +// tslint:disable-next-line:max-line-length import {Convolution2DLayerBuilder, LayerBuilder, MaxPoolLayerBuilder} from './layer_builder'; export enum Normalization { diff --git a/demos/models/imagenet_classes.ts b/demos/models/imagenet_classes.ts index b9c88a399e..92c79d06ee 100644 --- a/demos/models/imagenet_classes.ts +++ b/demos/models/imagenet_classes.ts @@ -16,7 +16,8 @@ limitations under the License. export const IMAGENET_CLASSES: {[key: number]: string} = { 0: 'tench, Tinca tinca', 1: 'goldfish, Carassius auratus', - 2: 'great white shark, white shark, man-eater, man-eating shark, Carcharodon carcharias', + 2: 'great white shark, white shark, man-eater, man-eating shark, ' + + 'Carcharodon carcharias', 3: 'tiger shark, Galeocerdo cuvieri', 4: 'hammerhead, hammerhead shark', 5: 'electric ray, crampfish, numbfish, torpedo', @@ -62,7 +63,8 @@ export const IMAGENET_CLASSES: {[key: number]: string} = { 45: 'Gila monster, Heloderma suspectum', 46: 'green lizard, Lacerta viridis', 47: 'African chameleon, Chamaeleo chamaeleon', - 48: 'Komodo dragon, Komodo lizard, dragon lizard, giant lizard, Varanus komodoensis', + 48: 'Komodo dragon, Komodo lizard, dragon lizard, giant lizard, ' + + 'Varanus komodoensis', 49: 'African crocodile, Nile crocodile, Crocodylus niloticus', 50: 'American alligator, Alligator mississipiensis', 51: 'triceratops', @@ -118,7 +120,8 @@ export const IMAGENET_CLASSES: {[key: number]: string} = { 101: 'tusker', 102: 'echidna, spiny anteater, anteater', 103: - 'platypus, duckbill, duckbilled platypus, duck-billed platypus, Ornithorhynchus anatinus', + 'platypus, duckbill, duckbilled platypus, duck-billed platypus, ' + + 'Ornithorhynchus anatinus', 104: 'wallaby, brush kangaroo', 105: 'koala, koala bear, kangaroo bear, native bear, Phascolarctos cinereus', 106: 'wombat', @@ -137,10 +140,12 @@ export const IMAGENET_CLASSES: {[key: number]: string} = { 119: 'rock crab, Cancer irroratus', 120: 'fiddler crab', 121: - 'king crab, Alaska crab, Alaskan king crab, Alaska king crab, Paralithodes camtschatica', + 'king crab, Alaska crab, Alaskan king crab, Alaska king crab, ' + + 'Paralithodes camtschatica', 122: 'American lobster, Northern lobster, Maine lobster, Homarus americanus', 123: - 'spiny lobster, langouste, rock lobster, crawfish, crayfish, sea crawfish', + 'spiny lobster, langouste, rock lobster, crawfish, crayfish, sea ' + + 'crawfish', 124: 'crayfish, crawfish, crawdad, crawdaddy', 125: 'hermit crab', 126: 'isopod', @@ -165,7 +170,8 @@ export const IMAGENET_CLASSES: {[key: number]: string} = { 145: 'king penguin, Aptenodytes patagonica', 146: 'albatross, mollymawk', 147: - 'grey whale, gray whale, devilfish, Eschrichtius gibbosus, Eschrichtius robustus', + 'grey whale, gray whale, devilfish, Eschrichtius gibbosus, ' + + 'Eschrichtius robustus', 148: 'killer whale, killer, orca, grampus, sea wolf, Orcinus orca', 149: 'dugong, Dugong dugon', 150: 'sea lion', @@ -199,7 +205,8 @@ export const IMAGENET_CLASSES: {[key: number]: string} = { 178: 'Weimaraner', 179: 'Staffordshire bullterrier, Staffordshire bull terrier', 180: - 'American Staffordshire terrier, Staffordshire terrier, American pit bull terrier, pit bull terrier', + 'American Staffordshire terrier, Staffordshire terrier, American pit ' + + 'bull terrier, pit bull terrier', 181: 'Bedlington terrier', 182: 'Border terrier', 183: 'Kerry blue terrier', @@ -306,7 +313,8 @@ export const IMAGENET_CLASSES: {[key: number]: string} = { 284: 'Siamese cat, Siamese', 285: 'Egyptian cat', 286: - 'cougar, puma, catamount, mountain lion, painter, panther, Felis concolor', + 'cougar, puma, catamount, mountain lion, painter, panther, ' + + 'Felis concolor', 287: 'lynx, catamount', 288: 'leopard, Panthera pardus', 289: 'snow leopard, ounce, Panthera uncia', @@ -315,7 +323,8 @@ export const IMAGENET_CLASSES: {[key: number]: string} = { 292: 'tiger, Panthera tigris', 293: 'cheetah, chetah, Acinonyx jubatus', 294: 'brown bear, bruin, Ursus arctos', - 295: 'American black bear, black bear, Ursus americanus, Euarctos americanus', + 295: 'American black bear, black bear, Ursus americanus, Euarctos ' + + 'americanus', 296: 'ice bear, polar bear, Ursus Maritimus, Thalarctos maritimus', 297: 'sloth bear, Melursus ursinus, Ursus ursinus', 298: 'mongoose', @@ -340,7 +349,8 @@ export const IMAGENET_CLASSES: {[key: number]: string} = { 317: 'leafhopper', 318: 'lacewing, lacewing fly', 319: - 'dragonfly, darning needle, devil\'s darning needle, sewing needle, snake feeder, snake doctor, mosquito hawk, skeeter hawk', + 'dragonfly, darning needle, devil\'s darning needle, sewing needle, ' + + 'snake feeder, snake doctor, mosquito hawk, skeeter hawk', 320: 'damselfly', 321: 'admiral', 322: 'ringlet, ringlet butterfly', @@ -371,7 +381,8 @@ export const IMAGENET_CLASSES: {[key: number]: string} = { 347: 'bison', 348: 'ram, tup', 349: - 'bighorn, bighorn sheep, cimarron, Rocky Mountain bighorn, Rocky Mountain sheep, Ovis canadensis', + 'bighorn, bighorn sheep, cimarron, Rocky Mountain bighorn, Rocky ' + + 'Mountain sheep, Ovis canadensis', 350: 'ibex, Capra ibex', 351: 'hartebeest', 352: 'impala, Aepyceros melampus', @@ -414,7 +425,8 @@ export const IMAGENET_CLASSES: {[key: number]: string} = { 389: 'barracouta, snoek', 390: 'eel', 391: - 'coho, cohoe, coho salmon, blue jack, silver salmon, Oncorhynchus kisutch', + 'coho, cohoe, coho salmon, blue jack, silver salmon, Oncorhynchus ' + + 'kisutch', 392: 'rock beauty, Holocanthus tricolor', 393: 'anemone fish', 394: 'sturgeon', @@ -436,7 +448,8 @@ export const IMAGENET_CLASSES: {[key: number]: string} = { 410: 'apiary, bee house', 411: 'apron', 412: - 'ashcan, trash can, garbage can, wastebin, ash bin, ash-bin, ashbin, dustbin, trash barrel, trash bin', + 'ashcan, trash can, garbage can, wastebin, ash bin, ash-bin, ashbin, ' + + 'dustbin, trash barrel, trash bin', 413: 'assault rifle, assault gun', 414: 'backpack, back pack, knapsack, packsack, rucksack, haversack', 415: 'bakery, bakeshop, bakehouse', @@ -461,7 +474,8 @@ export const IMAGENET_CLASSES: {[key: number]: string} = { 434: 'bath towel', 435: 'bathtub, bathing tub, bath, tub', 436: - 'beach wagon, station wagon, wagon, estate car, beach waggon, station waggon, waggon', + 'beach wagon, station wagon, wagon, estate car, beach waggon, station ' + + 'waggon, waggon', 437: 'beacon, lighthouse, beacon light, pharos', 438: 'beaker', 439: 'bearskin, busby, shako', @@ -506,7 +520,8 @@ export const IMAGENET_CLASSES: {[key: number]: string} = { 478: 'carton', 479: 'car wheel', 480: - 'cash machine, cash dispenser, automated teller machine, automatic teller machine, automated teller, automatic teller, ATM', + 'cash machine, cash dispenser, automated teller machine, automatic ' + + 'teller machine, automated teller, automatic teller, ATM', 481: 'cassette', 482: 'cassette player', 483: 'castle', @@ -517,7 +532,8 @@ export const IMAGENET_CLASSES: {[key: number]: string} = { 488: 'chain', 489: 'chainlink fence', 490: - 'chain mail, ring mail, mail, chain armor, chain armour, ring armor, ring armour', + 'chain mail, ring mail, mail, chain armor, chain armour, ring armor, ' + + 'ring armour', 491: 'chain saw, chainsaw', 492: 'chest', 493: 'chiffonier, commode', @@ -659,7 +675,8 @@ export const IMAGENET_CLASSES: {[key: number]: string} = { 629: 'lipstick, lip rouge', 630: 'Loafer', 631: 'lotion', - 632: 'loudspeaker, speaker, speaker unit, loudspeaker system, speaker system', + 632: 'loudspeaker, speaker, speaker unit, loudspeaker system, speaker ' + + 'system', 633: 'loupe, jeweler\'s loupe', 634: 'lumbermill, sawmill', 635: 'magnetic compass', @@ -762,7 +779,8 @@ export const IMAGENET_CLASSES: {[key: number]: string} = { 732: 'Polaroid camera, Polaroid Land camera', 733: 'pole', 734: - 'police van, police wagon, paddy wagon, patrol wagon, wagon, black Maria', + 'police van, police wagon, paddy wagon, patrol wagon, wagon, black ' + + 'Maria', 735: 'poncho', 736: 'pool table, billiard table, snooker table', 737: 'pop bottle, soda bottle', @@ -896,7 +914,8 @@ export const IMAGENET_CLASSES: {[key: number]: string} = { 865: 'toyshop', 866: 'tractor', 867: - 'trailer truck, tractor trailer, trucking rig, rig, articulated lorry, semi', + 'trailer truck, tractor trailer, trucking rig, rig, articulated ' + + 'lorry, semi', 868: 'tray', 869: 'trench coat', 870: 'tricycle, trike, velocipede', @@ -1016,7 +1035,8 @@ export const IMAGENET_CLASSES: {[key: number]: string} = { 984: 'rapeseed', 985: 'daisy', 986: - 'yellow lady\'s slipper, yellow lady-slipper, Cypripedium calceolus, Cypripedium parviflorum', + 'yellow lady\'s slipper, yellow lady-slipper, Cypripedium calceolus, ' + + 'Cypripedium parviflorum', 987: 'corn', 988: 'acorn', 989: 'hip, rose hip, rosehip', @@ -1027,7 +1047,8 @@ export const IMAGENET_CLASSES: {[key: number]: string} = { 994: 'stinkhorn, carrion fungus', 995: 'earthstar', 996: - 'hen-of-the-woods, hen of the woods, Polyporus frondosus, Grifola frondosa', + 'hen-of-the-woods, hen of the woods, Polyporus frondosus, Grifola ' + + 'frondosa', 997: 'bolete', 998: 'ear, spike, capitulum', 999: 'toilet tissue, toilet paper, bathroom tissue' diff --git a/demos/nn-art/cppn.ts b/demos/nn-art/cppn.ts index 85c55e32c4..c6870aa6cd 100644 --- a/demos/nn-art/cppn.ts +++ b/demos/nn-art/cppn.ts @@ -13,6 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ +// tslint:disable-next-line:max-line-length import {Array2D, gpgpu_util, GPGPUContext, NDArrayMathGPU, webgl_util} from '../deeplearnjs'; import * as nn_art_util from './nn_art_util'; diff --git a/demos/one_plus_one/one_plus_one.ts b/demos/one_plus_one/one_plus_one.ts index 5839012b6b..6ca71513bb 100644 --- a/demos/one_plus_one/one_plus_one.ts +++ b/demos/one_plus_one/one_plus_one.ts @@ -12,6 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ +// tslint:disable-next-line:max-line-length import {Graph, NDArrayMath, NDArrayMathGPU, Scalar, Session, Tensor} from '../deeplearnjs'; class Adder { diff --git a/src/graph_layers.ts b/src/graph_layers.ts index f9b4399387..f788842a05 100644 --- a/src/graph_layers.ts +++ b/src/graph_layers.ts @@ -14,6 +14,7 @@ limitations under the License. ==============================================================================*/ import {Graph, Tensor} from './graph'; +// tslint:disable-next-line:max-line-length import {Initializer, VarianceScalingInitializer, ZerosInitializer} from './initializers'; /** diff --git a/src/graph_runner_test.ts b/src/graph_runner_test.ts index 8fdfcfd081..80ae4357c9 100644 --- a/src/graph_runner_test.ts +++ b/src/graph_runner_test.ts @@ -14,6 +14,7 @@ limitations under the License. ==============================================================================*/ import {Graph, Tensor} from './graph'; +// tslint:disable-next-line:max-line-length import {GraphRunner, GraphRunnerEventObserver, MetricReduction} from './graph_runner'; import {NDArrayMath} from './math/math'; import {NDArrayMathCPU} from './math/math_cpu'; diff --git a/src/graph_util_test.ts b/src/graph_util_test.ts index 46ac188ee2..9a644459e5 100644 --- a/src/graph_util_test.ts +++ b/src/graph_util_test.ts @@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ - +// tslint:disable-next-line:max-line-length import {ConstantNode, Graph, Node, PlaceholderNode, ReLUNode, SplitNode, SquareNode, Tensor, VariableNode} from './graph'; import * as graph_util from './graph_util'; import {NDArray, Scalar} from './math/ndarray'; diff --git a/src/index.ts b/src/index.ts index dea2fe7577..ad474cfe1b 100644 --- a/src/index.ts +++ b/src/index.ts @@ -22,12 +22,16 @@ import * as util from './util'; export {CheckpointLoader} from './checkpoint_loader'; export {DataStats, InMemoryDataset} from './dataset'; export {Graph, Tensor} from './graph'; +// tslint:disable-next-line:max-line-length export {GraphRunner, GraphRunnerEventObserver, MetricReduction} from './graph_runner'; +// tslint:disable-next-line:max-line-length export {ConstantInitializer, Initializer, NDArrayInitializer, OnesInitializer, RandomNormalInitializer, RandomTruncatedNormalInitializer, RandomUniformInitializer, VarianceScalingInitializer, ZerosInitializer} from './initializers'; +// tslint:disable-next-line:max-line-length export {InCPUMemoryShuffledInputProviderBuilder, InGPUMemoryShuffledInputProviderBuilder, InputProvider} from './input_provider'; export {MatrixOrientation, NDArrayMath} from './math/math'; export {NDArrayMathCPU} from './math/math_cpu'; export {NDArrayMathGPU} from './math/math_gpu'; +// tslint:disable-next-line:max-line-length export {Array1D, Array2D, Array3D, Array4D, NDArray, Scalar} from './math/ndarray'; export {GPGPUContext} from './math/webgl/gpgpu_context'; export {Optimizer} from './optimizer'; diff --git a/src/math/ndarray.ts b/src/math/ndarray.ts index d12b293b62..a2fed9c572 100644 --- a/src/math/ndarray.ts +++ b/src/math/ndarray.ts @@ -55,7 +55,8 @@ export class NDArray { /** * Number of elements to skip in each dimension when indexing. See - * https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.strides.html + * https://docs.scipy.org/doc/numpy/reference/generated + * /numpy.ndarray.strides.html */ protected strides: number[]; diff --git a/src/math/webgl/conv_backprop_gpu.ts b/src/math/webgl/conv_backprop_gpu.ts index 5a4031baf0..c707f98aba 100644 --- a/src/math/webgl/conv_backprop_gpu.ts +++ b/src/math/webgl/conv_backprop_gpu.ts @@ -71,8 +71,9 @@ export function getFragmentShaderDerWeightsSource( // Map from 3D (xR, xC, d1) to 2D (xTexR, xTexC). // Map from 3D (yR, yC, d2) to 2D (yTexR, yTexC). - vec2 xyTexC = vec2(xC, yC_float) * vec2(${inputDepth}.0, ${outputDepth}.0) + - vec2(d1, d2); + vec2 xyTexC = + vec2(xC, yC_float) * vec2(${inputDepth}.0, ${outputDepth}.0) + + vec2(d1, d2); float xTexC = xyTexC.x; float yTexC = xyTexC.y; diff --git a/src/operation_emitter.ts b/src/operation_emitter.ts index 2eff5e9a45..6079fd76dd 100644 --- a/src/operation_emitter.ts +++ b/src/operation_emitter.ts @@ -13,6 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ +// tslint:disable-next-line:max-line-length import {AddNode, ArgMaxEqualsNode, ArgMaxNode, Concat3DNode, Convolution2DNode, DivideNode, ExpNode, FusedLinearCombinationNode, LogNode, MatMulNode, MaxPoolNode, MeanSquaredCostNode, MultiplyNode, Node, ReduceSumNode, ReLUNode, ReshapeNode, SigmoidNode, SoftmaxCrossEntropyCostNode, SoftmaxNode, SplitNode, SquareNode, SubtractNode, TanHNode} from './graph'; import * as graph_util from './graph_util'; import {Add} from './ops/add'; diff --git a/src/ops/element_wise_activation.ts b/src/ops/element_wise_activation.ts index 1dce380d1b..165b4014cf 100644 --- a/src/ops/element_wise_activation.ts +++ b/src/ops/element_wise_activation.ts @@ -14,6 +14,7 @@ limitations under the License. ==============================================================================*/ import {Tensor} from '../graph'; +// tslint:disable-next-line:max-line-length import {ActivationFunction, ReLUFunc, SigmoidFunc, SquareFunc, TanHFunc} from '../math/activation_functions'; import {NDArrayMath} from '../math/math'; import {TensorArrayMap} from '../tensor_array_map'; diff --git a/src/session_util.ts b/src/session_util.ts index 9ef12b3c53..c31563fedf 100644 --- a/src/session_util.ts +++ b/src/session_util.ts @@ -13,6 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ +// tslint:disable-next-line:max-line-length import {ConstantNode, Node, PlaceholderNode, SplitNode, Tensor, VariableNode} from './graph'; import * as graph_util from './graph_util'; import {InputProvider} from './input_provider'; diff --git a/src/session_util_test.ts b/src/session_util_test.ts index 1c36f9b80f..23478d2b03 100644 --- a/src/session_util_test.ts +++ b/src/session_util_test.ts @@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ - +// tslint:disable-next-line:max-line-length import {ConstantNode, Graph, Node, PlaceholderNode, SplitNode, Tensor, VariableNode} from './graph'; import {InputProvider} from './input_provider'; import {NDArrayMathCPU} from './math/math_cpu'; diff --git a/tslint.json b/tslint.json index 0b3f7867e7..6b67c36556 100644 --- a/tslint.json +++ b/tslint.json @@ -22,6 +22,7 @@ "interface-name": [true, "never-prefix"], "jsdoc-format": true, "label-position": true, + "max-line-length": [true, 80], "new-parens": true, "no-angle-bracket-type-assertion": true, "no-any": true,