Skip to content
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

Categoryencoding #48

Merged
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,9 @@ describeMathCPUAndGPU('Category Encoding', () => {
const encodingLayer = new CategoryEncoding({numTokens,
outputMode: 'multiHot'});
expect(() => encodingLayer.apply(categoryData))
.toThrowError(`When outputMode is not 'int', maximum output rank is 2
Received outputMode ${'multiHot'} and input shape ${categoryData.shape}
which would result in output rank ${categoryData.rank}.`);
.toThrowError(`When outputMode is not int, maximum output rank is 2`
+ ` Received outputMode ${'multiHot'} and input shape ${categoryData.shape}`
+ ` which would result in output rank ${categoryData.rank}.`);
});

it('Raises Value Error if max input value !<= numTokens', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { describeMathCPUAndGPU, expectTensorsClose} from '../../utils/test_utils
import { Tensor, tensor, tensor1d} from '@tensorflow/tfjs-core';
import * as utils from './preprocessing_utils';

describeMathCPUAndGPU('Tests for preprocessing utils', () => {
describeMathCPUAndGPU('Preprocessing Utils', () => {

it('Peforms int encoding correctly', () => {
const inputs = tensor([0, 1, 2], [3], 'int32');
Expand Down