@tensorflow/tfjs-data
Advanced tools
Comparing version 1.0.2 to 1.0.3
@@ -69,3 +69,2 @@ "use strict"; | ||
var tf = require("@tensorflow/tfjs-core"); | ||
var tensor_util_1 = require("@tensorflow/tfjs-core/dist/tensor_util"); | ||
var seedrandom = require("seedrandom"); | ||
@@ -842,5 +841,5 @@ var deep_map_1 = require("../util/deep_map"); | ||
} | ||
inputTensors = tensor_util_1.getTensorsInContainer(item.value); | ||
inputTensors = tf.tensor_util.getTensorsInContainer(item.value); | ||
mapped = this.transform(item.value); | ||
outputTensors = tensor_util_1.getTensorsInContainer(mapped); | ||
outputTensors = tf.tensor_util.getTensorsInContainer(mapped); | ||
// TODO(soergel) faster intersection | ||
@@ -850,3 +849,3 @@ // TODO(soergel) move to tf.disposeExcept(in, out)? | ||
t = inputTensors_1[_i]; | ||
if (!tensor_util_1.isTensorInList(t, outputTensors)) { | ||
if (!tf.tensor_util.isTensorInList(t, outputTensors)) { | ||
t.dispose(); | ||
@@ -936,7 +935,7 @@ } | ||
} | ||
inputTensors = tensor_util_1.getTensorsInContainer(item.value); | ||
inputTensors = tf.tensor_util.getTensorsInContainer(item.value); | ||
return [4 /*yield*/, this.transform(item.value)]; | ||
case 2: | ||
mapped = _a.sent(); | ||
outputTensors = tensor_util_1.getTensorsInContainer(mapped); | ||
outputTensors = tf.tensor_util.getTensorsInContainer(mapped); | ||
// TODO(soergel) faster intersection | ||
@@ -946,3 +945,3 @@ // TODO(soergel) move to tf.disposeExcept(in, out)? | ||
t = inputTensors_2[_i]; | ||
if (!tensor_util_1.isTensorInList(t, outputTensors)) { | ||
if (!tf.tensor_util.isTensorInList(t, outputTensors)) { | ||
t.dispose(); | ||
@@ -1032,5 +1031,5 @@ } | ||
} | ||
inputTensors = tensor_util_1.getTensorsInContainer(item.value); | ||
inputTensors = tf.tensor_util.getTensorsInContainer(item.value); | ||
mappedArray = this.transform(item.value); | ||
outputTensors = tensor_util_1.getTensorsInContainer(mappedArray); | ||
outputTensors = tf.tensor_util.getTensorsInContainer(mappedArray); | ||
this.outputQueue.pushAll(mappedArray); | ||
@@ -1041,3 +1040,3 @@ // TODO(soergel) faster intersection, and deduplicate outputTensors | ||
t = inputTensors_3[_i]; | ||
if (!tensor_util_1.isTensorInList(t, outputTensors)) { | ||
if (!tf.tensor_util.isTensorInList(t, outputTensors)) { | ||
t.dispose(); | ||
@@ -1044,0 +1043,0 @@ } |
@@ -18,4 +18,3 @@ /** | ||
*/ | ||
import { DataType } from '@tensorflow/tfjs-core'; | ||
import { TensorContainer, TensorContainerArray, TensorContainerObject } from '@tensorflow/tfjs-core/dist/tensor_types'; | ||
import { DataType, TensorContainer, TensorContainerArray, TensorContainerObject } from '@tensorflow/tfjs-core'; | ||
import { Dataset } from './dataset'; | ||
@@ -22,0 +21,0 @@ import { LazyIterator } from './iterators/lazy_iterator'; |
@@ -56,4 +56,3 @@ "use strict"; | ||
var tf = require("@tensorflow/tfjs-core"); | ||
var util_1 = require("@tensorflow/tfjs-core/dist/util"); | ||
var util_2 = require("util"); | ||
var util_1 = require("util"); | ||
/** | ||
@@ -279,7 +278,7 @@ * Apply a mapping function to a nested structure in a recursive manner. | ||
function canTensorify(obj) { | ||
return obj == null || util_2.isPrimitive(obj) || Array.isArray(obj) || | ||
return obj == null || util_1.isPrimitive(obj) || Array.isArray(obj) || | ||
(typeof obj === 'object' && (obj instanceof tf.Tensor)) || | ||
util_1.isTypedArray(obj); | ||
tf.util.isTypedArray(obj); | ||
} | ||
exports.canTensorify = canTensorify; | ||
//# sourceMappingURL=deep_map.js.map |
/** @license See the LICENSE file. */ | ||
declare const version = "1.0.2"; | ||
declare const version = "1.0.3"; | ||
export { version }; |
@@ -5,4 +5,4 @@ "use strict"; | ||
// This code is auto-generated, do not modify this file! | ||
var version = '1.0.2'; | ||
var version = '1.0.3'; | ||
exports.version = version; | ||
//# sourceMappingURL=version.js.map |
{ | ||
"name": "@tensorflow/tfjs-data", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "TensorFlow Data API in JavaScript", | ||
@@ -14,3 +14,3 @@ "private": false, | ||
"devDependencies": { | ||
"@tensorflow/tfjs-core": "1.0.2", | ||
"@tensorflow/tfjs-core": "1.0.3", | ||
"@types/fetch-mock": "^6.0.1", | ||
@@ -56,3 +56,3 @@ "@types/jasmine": "~2.5.53", | ||
"peerDependencies": { | ||
"@tensorflow/tfjs-core": "1.0.2" | ||
"@tensorflow/tfjs-core": "1.0.3" | ||
}, | ||
@@ -59,0 +59,0 @@ "dependencies": { |
@@ -20,5 +20,4 @@ /** | ||
import * as tf from '@tensorflow/tfjs-core'; | ||
import {TensorLike} from '@tensorflow/tfjs-core/dist/types'; | ||
import {TensorLike} from '@tensorflow/tfjs-core'; | ||
import * as seedrandom from 'seedrandom'; | ||
import {iteratorFromConcatenated, iteratorFromFunction, iteratorFromItems, iteratorFromZipped, LazyIterator, ZipMismatchMode} from './iterators/lazy_iterator'; | ||
@@ -25,0 +24,0 @@ import {DataElement, DatasetContainer} from './types'; |
@@ -20,3 +20,2 @@ /** | ||
import * as tf from '@tensorflow/tfjs-core'; | ||
import {getTensorsInContainer, isTensorInList} from '@tensorflow/tfjs-core/dist/tensor_util'; | ||
import * as seedrandom from 'seedrandom'; | ||
@@ -716,3 +715,3 @@ import {DataElement, IteratorContainer} from '../types'; | ||
} | ||
const inputTensors = getTensorsInContainer(item.value as {}); | ||
const inputTensors = tf.tensor_util.getTensorsInContainer(item.value as {}); | ||
// Careful: the transform may mutate the item in place. | ||
@@ -725,3 +724,3 @@ // That's why we have to remember the input Tensors above, and then | ||
const mapped = this.transform(item.value); | ||
const outputTensors = getTensorsInContainer(mapped as {}); | ||
const outputTensors = tf.tensor_util.getTensorsInContainer(mapped as {}); | ||
@@ -731,3 +730,3 @@ // TODO(soergel) faster intersection | ||
for (const t of inputTensors) { | ||
if (!isTensorInList(t, outputTensors)) { | ||
if (!tf.tensor_util.isTensorInList(t, outputTensors)) { | ||
t.dispose(); | ||
@@ -800,3 +799,3 @@ } | ||
} | ||
const inputTensors = getTensorsInContainer(item.value as {}); | ||
const inputTensors = tf.tensor_util.getTensorsInContainer(item.value as {}); | ||
// Careful: the transform may mutate the item in place. | ||
@@ -809,3 +808,3 @@ // That's why we have to remember the input Tensors above, and then | ||
const mapped = await this.transform(item.value); | ||
const outputTensors = getTensorsInContainer(mapped as {}); | ||
const outputTensors = tf.tensor_util.getTensorsInContainer(mapped as {}); | ||
@@ -815,3 +814,3 @@ // TODO(soergel) faster intersection | ||
for (const t of inputTensors) { | ||
if (!isTensorInList(t, outputTensors)) { | ||
if (!tf.tensor_util.isTensorInList(t, outputTensors)) { | ||
t.dispose(); | ||
@@ -901,3 +900,3 @@ } | ||
} | ||
const inputTensors = getTensorsInContainer(item.value as {}); | ||
const inputTensors = tf.tensor_util.getTensorsInContainer(item.value as {}); | ||
// Careful: the transform may mutate the item in place. | ||
@@ -909,3 +908,4 @@ // that's why we have to remember the input Tensors above, and then | ||
const mappedArray = this.transform(item.value); | ||
const outputTensors = getTensorsInContainer(mappedArray as {}); | ||
const outputTensors = | ||
tf.tensor_util.getTensorsInContainer(mappedArray as {}); | ||
this.outputQueue.pushAll(mappedArray); | ||
@@ -916,3 +916,3 @@ | ||
for (const t of inputTensors) { | ||
if (!isTensorInList(t, outputTensors)) { | ||
if (!tf.tensor_util.isTensorInList(t, outputTensors)) { | ||
t.dispose(); | ||
@@ -919,0 +919,0 @@ } |
@@ -19,4 +19,3 @@ /** | ||
import {DataType} from '@tensorflow/tfjs-core'; | ||
import {TensorContainer, TensorContainerArray, TensorContainerObject} from '@tensorflow/tfjs-core/dist/tensor_types'; | ||
import {DataType, TensorContainer, TensorContainerArray, TensorContainerObject} from '@tensorflow/tfjs-core'; | ||
import {Dataset} from './dataset'; | ||
@@ -23,0 +22,0 @@ import {LazyIterator} from './iterators/lazy_iterator'; |
@@ -20,3 +20,2 @@ /** | ||
import * as tf from '@tensorflow/tfjs-core'; | ||
import {isTypedArray} from '@tensorflow/tfjs-core/dist/util'; | ||
import {isPrimitive} from 'util'; | ||
@@ -269,3 +268,3 @@ | ||
(typeof obj === 'object' && (obj instanceof tf.Tensor)) || | ||
isTypedArray(obj); | ||
tf.util.isTypedArray(obj); | ||
} |
/** @license See the LICENSE file. */ | ||
// This code is auto-generated, do not modify this file! | ||
const version = '1.0.2'; | ||
const version = '1.0.3'; | ||
export {version}; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1718638
109
15984