NASNetLarge

class NASNetLarge(noTop: Boolean, inputShape: IntArray?) : TFModels.CV<Functional>

This model is a neural network for image classification that take images as input and classify the major object in the image into a set of 1000 different classes (labels are available via org.jetbrains.kotlinx.dl.api.core.util.loadImageNetClassLabels method).

Instantiates the NASNetLarge architecture.

The model have

  • an input with the shape (1x224x224x3)

  • an output with the shape (1x1000)

NOTE: This model is converted from Keras.applications, the last few layers in the noTop model have been removed so that the user can fine-tune the model for his specific task.

See also

Constructors

NASNetLarge
Link copied to clipboard
fun NASNetLarge(noTop: Boolean = false, inputShape: IntArray? = intArrayOf(331, 331, 3))

Functions

model
Link copied to clipboard
open fun model(modelHub: ModelHub): Functional

Loads the model, identified by this name, from the modelHub.

preInit
Link copied to clipboard
open fun preInit(): InferenceModel
preprocessInput
Link copied to clipboard
open fun preprocessInput(imageFile: File, preprocessing: Preprocessing): FloatArray
open override fun preprocessInput(data: FloatArray, tensorShape: LongArray): FloatArray

Common preprocessing function for the Neural Networks trained on ImageNet and whose weights are available with the keras.application.

pretrainedModel
Link copied to clipboard
open override fun pretrainedModel(modelHub: ModelHub): ImageRecognitionModel

Returns the specially prepared pre-trained model of the type U.

Properties

channelsFirst
Link copied to clipboard
open override val channelsFirst: Boolean

If true it means that the second dimension is related to number of channels in image has short notation as NCWH, otherwise, channels are at the last position and has a short notation as NHWC.

inputShape
Link copied to clipboard
var inputShape: IntArray?
modelRelativePath
Link copied to clipboard
open override val modelRelativePath: String

Relative path to model for local and S3 buckets storages.