Tensorflow.js tf.separableConv2d() Function
Tensorflow.js is an open-source library that is developed by Google for running machine learning models as well as deep learning neural networks in the browser or node environment.
The .separableConv2d() function is used to determine a 2D complication along with filters that are separable. It executes a depthwise complication which works distinctly on channels pursued by means of a pointwise complexity which is helpful in mixing channels. Moreover, it specifies separability within [1, 2] and 3 dimensions, absolutely not structural separability within 1 and 2 dimensions.
tf.separableConv2d(x, depthwiseFilter, pointwiseFilter, strides, pad, dilation?, dataFormat?)
- x: The stated input tensor which is either of rank 3 or else rank 4 and of shape: [batch, height, width, inChannels]. Moreover, in case the rank is 3, then the batch of size 1 is presumed. It can be of type tf.Tensor3D, tf.Tensor4D, TypedArray, or Array.
- depthwiseFilter: The stated depthwise filter tensor of rank 4 and shape: [filterHeight, filterWidth, inChannels, channelMultiplier]. However, it is utilized in the initial stage. It can be of type tf.Tensor4D, TypedArray, or Array.
- pointwiseFilter: The stated pointwise filter tensor of rank 4 and shape: [1, 1, inChannels * channelMultiplier, outChannels]. However, it is utilized in the second stage of the operation. It can be of type tf.Tensor4D, TypedArray, or Array.
- strides: The stated strides of the complication of shape: [strideHeight, strideWidth]. In case, the stated strides is a singular number, then strideHeight == strideWidth. It can be of type [number, number], or number.
- pad: The stated type of algorithm for padding. It can be of type valid or same.
- Here, for ‘same’ along with stride 1, the output would have an identical size as input, irrespective of the filter size.
- For, ‘valid’ the output shall be smaller than the input in case, the filter size is greater than 1*1×1.
- dilation: The stated dilation. It is optional and is of type [number, number], or number.
- dataFormat: The stated elective string from “NHWC”, or “NCHW”. It specifies the data shape of the stated input as well as output data. The by default value is ‘NHWC’. Moreover, the data here is saved in the following order: [batch, height, width, channels]. It is optional and is of type ‘NHWC’.
Return Value: It returns tf.Tensor3D or tf.Tensor4D.
Tensor [ [ [,]]]
Tensor [[[[51.6340065 ], [107.0520096]]]]
My Personal Notes arrow_drop_up
Please Login to comment...