<commit_before># Module google/&zwnj;imagenet/&zwnj;inception_v1/&zwnj;feature_vector/1
Feature vectors of images with Inception V1 trained on ImageNet (ILSVRC-2012-CLS).

<!-- dataset: ImageNet (ILSVRC-2012-CLS) -->
<!-- module-type: image-feature-vector -->
<!-- network-architecture: Inception V1 -->
<!-- fine-tunable: true -->
<!-- format: hub -->


## Overview

Inception V1 (a.k.a. GoogLeNet) is a neural network architecture
for image classification, originally published by

  * <NAME>, <NAME>, <NAME>, <NAME>, <NAME>,
    <NAME>, <NAME>, <NAME> and <NAME>:
    ["Going deeper with convolutions"](https://arxiv.org/abs/1409.4842), 2014.

This TF-Hub module uses the TF-Slim implementation of `inception_v1`.
The module contains a trained instance of the network, packaged to get
[feature vectors from images](https://www.tensorflow.org/hub/common_signatures/images#feature-vector).
If you want the full model including the classification it was originally
trained for, use module
[`google/imagenet/inception_v1/classification/1`](https://tfhub.dev/google/imagenet/inception_v1/classification/1)
instead.


## Training

The checkpoint exported into this module was `inception_v1_2016_08_28/inception_v1.ckpt` downloaded
from
[TF-Slim's pre-trained models](https://github.com/tensorflow/models/blob/master/research/slim/README.md#pre-trained-models).
Its weights were originally obtained by training on the ILSVRC-2012-CLS
dataset for image classification ("Imagenet").


## Usage

This module implements the common signature for computing
[image feature vectors](https://www.tensorflow.org/hub/common_signatures/images#feature-vector).
It can be used like

```python
module = hub.Module("https://tfhub.dev/google/imagenet/inception_v1/feature_vector/1")
height, width = hub.get_expected_image_size(module)
images = ...  # A batch of images with shape [batch_size, height, width, 3].
features = module(images)  # Features with shape [batch_size, num_features].
```

...or using the signature name `image_feature_vector`. The output for each image
in the batch is a feature vector of size `num_features` = 1024.

For this module, the size of the input image is fixed to
`height` x `width` = 224 x 224 pixels.
The input `images` are expected to have color values in the range [0,1],
following the
[common image input](https://www.tensorflow.org/hub/common_signatures/images#input)
conventions.


## Fine-tuning

Consumers of this module can [fine-tune](https://www.tensorflow.org/hub/tf1_hub_module#fine-tuning) it.
This requires importing the graph version with tag set `{"train"}`
in order to operate batch normalization in training mode.

<commit_msg>Copybara import of the project:<commit_after># Module google/&zwnj;imagenet/&zwnj;inception_v1/&zwnj;feature_vector/1
Feature vectors of images with Inception V1 trained on ImageNet (ILSVRC-2012-CLS).

<!-- dataset: ImageNet (ILSVRC-2012-CLS) -->
<!-- module-type: image-feature-vector -->
<!-- network-architecture: Inception V1 -->
<!-- fine-tunable: true -->
<!-- format: hub -->


## Overview

Inception V1 (a.k.a. GoogLeNet) is a neural network architecture
for image classification, originally published by

  * <NAME>, <NAME>, <NAME>, <NAME>, <NAME>,
    <NAME>, <NAME>, <NAME> and <NAME>:
    ["Going deeper with convolutions"](https://arxiv.org/abs/1409.4842), 2014.

This TF-Hub module uses the TF-Slim implementation of `inception_v1`.
The module contains a trained instance of the network, packaged to get
[feature vectors from images](https://www.tensorflow.org/hub/common_signatures/images#feature-vector).
If you want the full model including the classification it was originally
trained for, use module
[`google/imagenet/inception_v1/classification/1`](https://tfhub.dev/google/imagenet/inception_v1/classification/1)
instead.


## Training

The checkpoint exported into this module was `inception_v1_2016_08_28/inception_v1.ckpt` downloaded
from
[TF-Slim's pre-trained models](https://github.com/tensorflow/models/blob/master/research/slim/README.md#pre-trained-models).
Its weights were originally obtained by training on the ILSVRC-2012-CLS
dataset for image classification ("Imagenet").


## Usage

This module implements the common signature for computing
[image feature vectors](https://www.tensorflow.org/hub/common_signatures/images#feature-vector).
It can be used like

```python
module = hub.Module("https://tfhub.dev/google/imagenet/inception_v1/feature_vector/1")
height, width = hub.get_expected_image_size(module)
images = ...  # A batch of images with shape [batch_size, height, width, 3].
features = module(images)  # Features with shape [batch_size, num_features].
```

...or using the signature name `image_feature_vector`. The output for each image
in the batch is a feature vector of size `num_features` = 1024.

For this module, the size of the input image is fixed to
`height` x `width` = 224 x 224 pixels.
The input `images` are expected to have color values in the range [0,1],
following the
[common image input](https://www.tensorflow.org/hub/common_saved_model_apis/images)
conventions.


## Fine-tuning

Consumers of this module can [fine-tune](https://www.tensorflow.org/hub/tf1_hub_module#fine-tuning) it.
This requires importing the graph version with tag set `{"train"}`
in order to operate batch normalization in training mode.


{'fraction_non_alphanumeric': 0.1199400299850075, 'fraction_numerical': 0.022488755622188907, 'mean_word_length': 4.871287128712871, 'pattern_counts': {'":': 0, '<': 31, '<?xml version=': 0, '>': 31, 'https://': 16, 'lorem ipsum': 0, 'www.': 8, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5136905', 'n_tokens_mistral': 1728, 'n_tokens_neox': 1602, 'n_words': 518}