license import { ENGINE } from '../engine' ; import { Tile , TileAttrs , TileInputs } from '../kernel_names' ; import { NamedAttrMap } from '../kernel_registry' ; import { Tensor } from '../tensor' ; import { NamedTensorMap } from '../tensor_types' ; import { convertToTensor } from '../tensor_util_env' ; import { TensorLike } from '../types' ; import * as util from '../util' ; import { op } from './operation' ; param x param reps doc function tile_ < T extends Tensor > ( x , reps ) { const $x = convertToTensor ( x , 'x' , 'tile' , 'string_or_numeric' ) ; util . assert ( $x . rank === reps . length , ( ) => `Error in transpose: rank of input ${ $x . rank } ` + `must match length of reps ${ reps }.` ) ; const inputs = { x : $x } ; const attrs = { reps } ; return ENGINE . runKernel ( Tile , inputs as unknown as NamedTensorMap , attrs as unknown as NamedAttrMap ) ; } export const tile = op ( { tile_ } ) ;