k3im


Namek3im JSON
Version 0.0.11 PyPI version JSON
download
home_page
Summary
upload_time2023-12-28 21:55:13
maintainer
docs_urlNone
authorMuhammad Anas Raza
requires_python>=3.10,<4.0
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # K3IM: Keras 3 Image Models

Note: K3IM is under heavy development with many fascinating features on the way. A stable/tested release is expected by the end of 2023.
![Logo](assets/Banner.png)

## Installation

```shell
pip install k3im --upgrade
```



## Usage

You can set up any backend using following commands:
```python
import os
os.environ['KERAS_BACKEND'] = 'jax' #or 'tensorflow' or 'torch' 
```

### Example 1D Models: 
Test 1D Models: <a target="_blank" href="https://colab.research.google.com/github/anas-rz/k3im/blob/main/spinups/spin_up_the_simplest_1d.ipynb">
  <img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/>
</a>


### Example 2D Models:
Test 2D Models: <a target="_blank" href="https://colab.research.google.com/github/anas-rz/k3im/blob/main/spinups/spin_up_the_simplest.ipynb">
  <img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/>
</a>

### Example 3D/Video Models:

 <a target="_blank" href="https://colab.research.google.com/github/anas-rz/k3im/blob/main/spinups/spin_up_the_simplest_3d_video.ipynb">
  <img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/>
</a>

### Class-Attention in Image Transformers (CaiT) :white_check_mark: 1D, :white_check_mark: Image/2D, :white_check_mark: 3D


### Compact Convolution Transformer :white_check_mark: 1D, :white_check_mark: Image/2D, :white_check_mark: 3D, :white_check_mark: space-time

CCT proposes compact transformers by using convolutions instead of patching and performing sequence pooling. This allows for CCT to have high accuracy and a low number of parameters.

1D
```python
from k3im.cct_1d import CCT_1DModel
model = CCT_1DModel(
    input_shape=(500, 1),
    num_heads=4,
    projection_dim=154,
    kernel_size=10,
    stride=15,
    padding=5,
    transformer_units=[154],
    stochastic_depth_rate=0.5,
    transformer_layers=1,
    num_classes=4,
    positional_emb=False,
)
```
2D
```python
from k3im.cct import CCT

model = CCT(
    input_shape=input_shape,
    num_heads=8,
    projection_dim=32,
    kernel_size=3,
    stride=3,
    padding=2,
    transformer_units=[16, 32],
    stochastic_depth_rate=0.6,
    transformer_layers=2,
    num_classes=10,
    positional_emb=False,
)
```
3D
```python
from k3im.cct_3d import CCT3DModel
model = CCT3DModel(input_shape=(28, 28, 28, 1),
    num_heads=4,
    projection_dim=64,
    kernel_size=4,
    stride=4,
    padding=2,
    transformer_units=[16, 64],
    stochastic_depth_rate=0.6,
    transformer_layers=2,
    num_classes=10,
    positional_emb=False,)
```
### ConvMixer :white_check_mark: 1D, :white_check_mark: Image/2D, :white_check_mark: 3D, :white_check_mark: space-time

ConvMixer uses recipes from the recent isotrophic architectures like ViT, MLP-Mixer (Tolstikhin et al.), such as using the same depth and resolution across different layers in the network, residual connections, and so on.

```python
from k3im.convmixer_1d import ConvMixer1DModel
model = ConvMixer1DModel(seq_len=500,
    n_features=1,
    filters=128,
    depth=4,
    kernel_size=15,
    patch_size=4,
    num_classes=10,)
```
2D
```python
from k3im.convmixer import ConvMixer # Check convmixer

model = ConvMixer(
    image_size=28, filters=64, depth=8, kernel_size=3, patch_size=2, num_classes=10, num_channels=1
)
```
3D
```python
from k3im.convmixer_3d import ConvMixer3DModel
model = ConvMixer3DModel(image_size=28,
    num_frames=28,
    filters=32,
    depth=2,
    kernel_size=4,
    kernel_depth=3,
    patch_size=3,
    patch_depth=3,
    num_classes=10,
    num_channels=1)
```
### Cross ViT :white_check_mark: Image/2D

### Deep ViT :white_check_mark: Image/2D

### External Attention Network :white_check_mark: 1D, :white_check_mark: Image/2D, :white_check_mark: 3D, :white_check_mark: space-time

Based on two external, small, learnable, and shared memories, which can be implemented easily by simply using two cascaded linear layers and two normalization layers. It conveniently replaces self-attention as used in existing architectures. External attention has linear complexity, as it only implicitly considers the correlations between all samples.

```python
from k3im.eanet_1d import EANet1DModel
model = EANet1DModel(
    seq_len=500,
    patch_size=20,
    num_classes=10,
    dim=96,
    depth=3,
    heads=32,
    mlp_dim=64,
    dim_coefficient=2,
    attention_dropout=0.0,
    channels=1,
)
```
2D
```python
from k3im.eanet import EANet
model = EANet(
    input_shape=input_shape,
    patch_size=7,
    embedding_dim=64,
    num_transformer_blocks=2,
    mlp_dim=32,
    num_heads=16,
    dim_coefficient=2,
    attention_dropout=0.5,
    projection_dropout=0.5,
    num_classes=10,
)
```
3D
```python
from k3im.eanet3d import EANet3DModel
model = EANet3DModel(
    image_size=28,
    image_patch_size=7,
    frames=28,
    frame_patch_size=7,
    num_classes=10,
    dim=64,
    depth=2,
    heads=4,
    mlp_dim=32,
    channels=1,
    dim_coefficient=4,
    projection_dropout=0.0,
    attention_dropout=0,
)
```
### Fourier Net :white_check_mark: 1D, :white_check_mark: Image/2D, :white_check_mark: 3D, :white_check_mark: space-time

The FNet uses a similar block to the Transformer block. However, FNet replaces the self-attention layer in the Transformer block with a parameter-free 2D Fourier transformation layer:
One 1D Fourier Transform is applied along the patches.
One 1D Fourier Transform is applied along the channels.

### Focal Modulation Network :white_check_mark: Image/2D
Released by Microsoft in 2022, FocalNet or Focal Modulation Network is an attention-free architecture achieving superior performance than SoTA self-attention (SA) methods across various vision benchmarks. 
```python
from k3im.focalnet import focalnet_kid # jax ✅, tensorflow ✅, torch ✅
model = focalnet_kid(img_size=28, in_channels=1, num_classes=10)
model.summary()
```

### gMLP :white_check_mark: 1D, :white_check_mark: Image/2D, :white_check_mark: 3D, :white_check_mark: space-time

The gMLP is a MLP architecture that features a Spatial Gating Unit (SGU). The SGU enables cross-patch interactions across the spatial (channel) dimension, by:

1. Transforming the input spatially by applying linear projection across patches (along channels).

2. Applying element-wise multiplication of the input and its spatial transformation.

1D
```python
from k3im.gmlp_1d import gMLP1DModel
model = gMLP1DModel(seq_len=500, patch_size=20, num_classes=10, dim=64, depth=4, channels=1, dropout_rate=0.0)
```
2D
```python
from k3im.gmlp import gMLPModel
model = gMLPModel(
    image_size=28,
    patch_size=7,
    embedding_dim=32,
    num_blocks=4,
    dropout_rate=0.5,
    num_classes=10,
    positional_encoding=False,
    num_channels=1,
)
```
3D
```python
from k3im.gmlp_3d import gMLP3DModel
model = gMLP3DModel(
    image_size=28,
    image_patch_size=7,
    frames=28,
    frame_patch_size=7,
    num_classes=10,
    dim=32,
    depth=4,
    hidden_units=32,
    dropout_rate=0.4,
    channels=1,
)
```

### MLP Mixer :white_check_mark: 1D, :white_check_mark: Image/2D, :white_check_mark: 3D, :white_check_mark: space-time

MLP-Mixer is an architecture based exclusively on multi-layer perceptrons (MLPs), that contains two types of MLP layers: 
One applied independently to image patches, which mixes the per-location features.
The other applied across patches (along channels), which mixes spatial information.
This is similar to a depthwise separable convolution based model such as the Xception model, but with two chained dense transforms, no max pooling, and layer normalization instead of batch normalization.

```python
from k3im.mlp_mixer_1d import Mixer1DModel
model = Mixer1DModel(seq_len=500, patch_size=20, num_classes=10, dim=64, depth=4, channels=1, dropout_rate=0.0)
```
2D
```python
from k3im.mlp_mixer import MixerModel
model = MixerModel(
    image_size=28,
    patch_size=7,
    embedding_dim=32,
    num_blocks=4,
    dropout_rate=0.5,
    num_classes=10,
    positional_encoding=True,
    num_channels=1,
)

```
3D
```python
from k3im.mlp_mixer_3d import MLPMixer3DModel

model = MLPMixer3DModel(
    image_size=28,
    image_patch_size=7,
    frames=28,
    frame_patch_size=7,
    num_classes=10,
    dim=32,
    depth=4,
    hidden_units=32,
    dropout_rate=0.4,
    channels=1,
)
```
### Simple Vision Transformer :white_check_mark: 1D, :white_check_mark: Image/2D, :white_check_mark: 3D

```python
from k3im.simple_vit_1d import SimpleViT1DModel
model = SimpleViT1DModel(seq_len=500,
    patch_size=20,
    num_classes=10,
    dim=32,
    depth=3,
    heads=8,
    mlp_dim=64,
    channels=1,
    dim_head=64)
```
3D

```python
from k3im.simple_vit_3d import SimpleViT3DModel

model = SimpleViT3DModel(
    image_size=28,
    image_patch_size=7,
    frames=28,
    frame_patch_size=7,
    num_classes=10,
    dim=32,
    depth=2,
    heads=4,
    mlp_dim=32,
    channels=1,
    dim_head=64,
)
```
### Simple Vision Transformer with FFT  :white_check_mark: Image/2D
2D
```python
from k3im.simple_vit_with_fft import SimpleViTFFT
model = SimpleViTFFT(image_size=28, patch_size=7, freq_patch_size=7, num_classes=10, dim=32, depth=2, 
                     heads=8, mlp_dim=64, channels=1, 
                     dim_head = 16)
```
### Simple Vision Transformer with Register Tokens :white_check_mark: Image/2D

Image/2D
```python
from k3im.simple_vit_with_register_tokens import SimpleViT_RT
model = SimpleViT_RT(image_size=28,
    patch_size=7,
    num_classes=10,
    dim=32,
    depth=2,
    heads=4,
    mlp_dim=64,
    num_register_tokens=4,
    channels=1,
    dim_head=64,)
```
### Swin Transformer :white_check_mark: Image/2D

Swin Transformer is a hierarchical Transformer whose representations are computed with shifted windows. The shifted window scheme brings greater efficiency by limiting self-attention computation to non-overlapping local windows while also allowing for cross-window connections. 
```python
from k3im.swint import SwinTModel
model = SwinTModel(
    img_size=28,
    patch_size=7,
    embed_dim=32,
    num_heads=4,
    window_size=4,
    num_mlp=4,
    qkv_bias=True,
    dropout_rate=0.2,
    shift_size=2,
    num_classes=10,
    in_channels=1,
)

```

### Token Learner :white_check_mark: Image/2D

### Vision Transformer :white_check_mark: 1D, :white_check_mark: Image/2D, :white_check_mark: 3D, :white_check_mark: space-time
```python
from k3im.vit_1d import ViT1DModel
model = ViT1DModel(seq_len=500,
    patch_size=20,
    num_classes=10,
    dim=32,
    depth=3,
    heads=8,
    mlp_dim=64,
    channels=1,
    dim_head=64)
```



### Vision Transformer with Patch Dropout :white_check_mark: Image/2D

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "k3im",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.10,<4.0",
    "maintainer_email": "",
    "keywords": "",
    "author": "Muhammad Anas Raza",
    "author_email": "memanasraza@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/ca/30/2e7b12c0fa6e2861cb5303c2a07f42cfa972d2f657520ca54e5de8ea5385/k3im-0.0.11.tar.gz",
    "platform": null,
    "description": "# K3IM: Keras 3 Image Models\n\nNote: K3IM is under heavy development with many fascinating features on the way. A stable/tested release is expected by the end of 2023.\n![Logo](assets/Banner.png)\n\n## Installation\n\n```shell\npip install k3im --upgrade\n```\n\n\n\n## Usage\n\nYou can set up any backend using following commands:\n```python\nimport os\nos.environ['KERAS_BACKEND'] = 'jax' #or 'tensorflow' or 'torch' \n```\n\n### Example 1D Models: \nTest 1D Models: <a target=\"_blank\" href=\"https://colab.research.google.com/github/anas-rz/k3im/blob/main/spinups/spin_up_the_simplest_1d.ipynb\">\n  <img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/>\n</a>\n\n\n### Example 2D Models:\nTest 2D Models: <a target=\"_blank\" href=\"https://colab.research.google.com/github/anas-rz/k3im/blob/main/spinups/spin_up_the_simplest.ipynb\">\n  <img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/>\n</a>\n\n### Example 3D/Video Models:\n\n <a target=\"_blank\" href=\"https://colab.research.google.com/github/anas-rz/k3im/blob/main/spinups/spin_up_the_simplest_3d_video.ipynb\">\n  <img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/>\n</a>\n\n### Class-Attention in Image Transformers (CaiT) :white_check_mark: 1D, :white_check_mark: Image/2D, :white_check_mark: 3D\n\n\n### Compact Convolution Transformer :white_check_mark: 1D, :white_check_mark: Image/2D, :white_check_mark: 3D, :white_check_mark: space-time\n\nCCT proposes compact transformers by using convolutions instead of patching and performing sequence pooling. This allows for CCT to have high accuracy and a low number of parameters.\n\n1D\n```python\nfrom k3im.cct_1d import CCT_1DModel\nmodel = CCT_1DModel(\n    input_shape=(500, 1),\n    num_heads=4,\n    projection_dim=154,\n    kernel_size=10,\n    stride=15,\n    padding=5,\n    transformer_units=[154],\n    stochastic_depth_rate=0.5,\n    transformer_layers=1,\n    num_classes=4,\n    positional_emb=False,\n)\n```\n2D\n```python\nfrom k3im.cct import CCT\n\nmodel = CCT(\n    input_shape=input_shape,\n    num_heads=8,\n    projection_dim=32,\n    kernel_size=3,\n    stride=3,\n    padding=2,\n    transformer_units=[16, 32],\n    stochastic_depth_rate=0.6,\n    transformer_layers=2,\n    num_classes=10,\n    positional_emb=False,\n)\n```\n3D\n```python\nfrom k3im.cct_3d import CCT3DModel\nmodel = CCT3DModel(input_shape=(28, 28, 28, 1),\n    num_heads=4,\n    projection_dim=64,\n    kernel_size=4,\n    stride=4,\n    padding=2,\n    transformer_units=[16, 64],\n    stochastic_depth_rate=0.6,\n    transformer_layers=2,\n    num_classes=10,\n    positional_emb=False,)\n```\n### ConvMixer :white_check_mark: 1D, :white_check_mark: Image/2D, :white_check_mark: 3D, :white_check_mark: space-time\n\nConvMixer uses recipes from the recent isotrophic architectures like ViT, MLP-Mixer (Tolstikhin et al.), such as using the same depth and resolution across different layers in the network, residual connections, and so on.\n\n```python\nfrom k3im.convmixer_1d import ConvMixer1DModel\nmodel = ConvMixer1DModel(seq_len=500,\n    n_features=1,\n    filters=128,\n    depth=4,\n    kernel_size=15,\n    patch_size=4,\n    num_classes=10,)\n```\n2D\n```python\nfrom k3im.convmixer import ConvMixer # Check convmixer\n\nmodel = ConvMixer(\n    image_size=28, filters=64, depth=8, kernel_size=3, patch_size=2, num_classes=10, num_channels=1\n)\n```\n3D\n```python\nfrom k3im.convmixer_3d import ConvMixer3DModel\nmodel = ConvMixer3DModel(image_size=28,\n    num_frames=28,\n    filters=32,\n    depth=2,\n    kernel_size=4,\n    kernel_depth=3,\n    patch_size=3,\n    patch_depth=3,\n    num_classes=10,\n    num_channels=1)\n```\n### Cross ViT :white_check_mark: Image/2D\n\n### Deep ViT :white_check_mark: Image/2D\n\n### External Attention Network :white_check_mark: 1D, :white_check_mark: Image/2D, :white_check_mark: 3D, :white_check_mark: space-time\n\nBased on two external, small, learnable, and shared memories, which can be implemented easily by simply using two cascaded linear layers and two normalization layers. It conveniently replaces self-attention as used in existing architectures. External attention has linear complexity, as it only implicitly considers the correlations between all samples.\n\n```python\nfrom k3im.eanet_1d import EANet1DModel\nmodel = EANet1DModel(\n    seq_len=500,\n    patch_size=20,\n    num_classes=10,\n    dim=96,\n    depth=3,\n    heads=32,\n    mlp_dim=64,\n    dim_coefficient=2,\n    attention_dropout=0.0,\n    channels=1,\n)\n```\n2D\n```python\nfrom k3im.eanet import EANet\nmodel = EANet(\n    input_shape=input_shape,\n    patch_size=7,\n    embedding_dim=64,\n    num_transformer_blocks=2,\n    mlp_dim=32,\n    num_heads=16,\n    dim_coefficient=2,\n    attention_dropout=0.5,\n    projection_dropout=0.5,\n    num_classes=10,\n)\n```\n3D\n```python\nfrom k3im.eanet3d import EANet3DModel\nmodel = EANet3DModel(\n    image_size=28,\n    image_patch_size=7,\n    frames=28,\n    frame_patch_size=7,\n    num_classes=10,\n    dim=64,\n    depth=2,\n    heads=4,\n    mlp_dim=32,\n    channels=1,\n    dim_coefficient=4,\n    projection_dropout=0.0,\n    attention_dropout=0,\n)\n```\n### Fourier Net :white_check_mark: 1D, :white_check_mark: Image/2D, :white_check_mark: 3D, :white_check_mark: space-time\n\nThe FNet uses a similar block to the Transformer block. However, FNet replaces the self-attention layer in the Transformer block with a parameter-free 2D Fourier transformation layer:\nOne 1D Fourier Transform is applied along the patches.\nOne 1D Fourier Transform is applied along the channels.\n\n### Focal Modulation Network :white_check_mark: Image/2D\nReleased by Microsoft in 2022, FocalNet or Focal Modulation Network is an attention-free architecture achieving superior performance than SoTA self-attention (SA) methods across various vision benchmarks. \n```python\nfrom k3im.focalnet import focalnet_kid # jax \u2705, tensorflow \u2705, torch \u2705\nmodel = focalnet_kid(img_size=28, in_channels=1, num_classes=10)\nmodel.summary()\n```\n\n### gMLP :white_check_mark: 1D, :white_check_mark: Image/2D, :white_check_mark: 3D, :white_check_mark: space-time\n\nThe gMLP is a MLP architecture that features a Spatial Gating Unit (SGU). The SGU enables cross-patch interactions across the spatial (channel) dimension, by:\n\n1. Transforming the input spatially by applying linear projection across patches (along channels).\n\n2. Applying element-wise multiplication of the input and its spatial transformation.\n\n1D\n```python\nfrom k3im.gmlp_1d import gMLP1DModel\nmodel = gMLP1DModel(seq_len=500, patch_size=20, num_classes=10, dim=64, depth=4, channels=1, dropout_rate=0.0)\n```\n2D\n```python\nfrom k3im.gmlp import gMLPModel\nmodel = gMLPModel(\n    image_size=28,\n    patch_size=7,\n    embedding_dim=32,\n    num_blocks=4,\n    dropout_rate=0.5,\n    num_classes=10,\n    positional_encoding=False,\n    num_channels=1,\n)\n```\n3D\n```python\nfrom k3im.gmlp_3d import gMLP3DModel\nmodel = gMLP3DModel(\n    image_size=28,\n    image_patch_size=7,\n    frames=28,\n    frame_patch_size=7,\n    num_classes=10,\n    dim=32,\n    depth=4,\n    hidden_units=32,\n    dropout_rate=0.4,\n    channels=1,\n)\n```\n\n### MLP Mixer :white_check_mark: 1D, :white_check_mark: Image/2D, :white_check_mark: 3D, :white_check_mark: space-time\n\nMLP-Mixer is an architecture based exclusively on multi-layer perceptrons (MLPs), that contains two types of MLP layers: \nOne applied independently to image patches, which mixes the per-location features.\nThe other applied across patches (along channels), which mixes spatial information.\nThis is similar to a depthwise separable convolution based model such as the Xception model, but with two chained dense transforms, no max pooling, and layer normalization instead of batch normalization.\n\n```python\nfrom k3im.mlp_mixer_1d import Mixer1DModel\nmodel = Mixer1DModel(seq_len=500, patch_size=20, num_classes=10, dim=64, depth=4, channels=1, dropout_rate=0.0)\n```\n2D\n```python\nfrom k3im.mlp_mixer import MixerModel\nmodel = MixerModel(\n    image_size=28,\n    patch_size=7,\n    embedding_dim=32,\n    num_blocks=4,\n    dropout_rate=0.5,\n    num_classes=10,\n    positional_encoding=True,\n    num_channels=1,\n)\n\n```\n3D\n```python\nfrom k3im.mlp_mixer_3d import MLPMixer3DModel\n\nmodel = MLPMixer3DModel(\n    image_size=28,\n    image_patch_size=7,\n    frames=28,\n    frame_patch_size=7,\n    num_classes=10,\n    dim=32,\n    depth=4,\n    hidden_units=32,\n    dropout_rate=0.4,\n    channels=1,\n)\n```\n### Simple Vision Transformer :white_check_mark: 1D, :white_check_mark: Image/2D, :white_check_mark: 3D\n\n```python\nfrom k3im.simple_vit_1d import SimpleViT1DModel\nmodel = SimpleViT1DModel(seq_len=500,\n    patch_size=20,\n    num_classes=10,\n    dim=32,\n    depth=3,\n    heads=8,\n    mlp_dim=64,\n    channels=1,\n    dim_head=64)\n```\n3D\n\n```python\nfrom k3im.simple_vit_3d import SimpleViT3DModel\n\nmodel = SimpleViT3DModel(\n    image_size=28,\n    image_patch_size=7,\n    frames=28,\n    frame_patch_size=7,\n    num_classes=10,\n    dim=32,\n    depth=2,\n    heads=4,\n    mlp_dim=32,\n    channels=1,\n    dim_head=64,\n)\n```\n### Simple Vision Transformer with FFT  :white_check_mark: Image/2D\n2D\n```python\nfrom k3im.simple_vit_with_fft import SimpleViTFFT\nmodel = SimpleViTFFT(image_size=28, patch_size=7, freq_patch_size=7, num_classes=10, dim=32, depth=2, \n                     heads=8, mlp_dim=64, channels=1, \n                     dim_head = 16)\n```\n### Simple Vision Transformer with Register Tokens :white_check_mark: Image/2D\n\nImage/2D\n```python\nfrom k3im.simple_vit_with_register_tokens import SimpleViT_RT\nmodel = SimpleViT_RT(image_size=28,\n    patch_size=7,\n    num_classes=10,\n    dim=32,\n    depth=2,\n    heads=4,\n    mlp_dim=64,\n    num_register_tokens=4,\n    channels=1,\n    dim_head=64,)\n```\n### Swin Transformer :white_check_mark: Image/2D\n\nSwin Transformer is a hierarchical Transformer whose representations are computed with shifted windows. The shifted window scheme brings greater efficiency by limiting self-attention computation to non-overlapping local windows while also allowing for cross-window connections. \n```python\nfrom k3im.swint import SwinTModel\nmodel = SwinTModel(\n    img_size=28,\n    patch_size=7,\n    embed_dim=32,\n    num_heads=4,\n    window_size=4,\n    num_mlp=4,\n    qkv_bias=True,\n    dropout_rate=0.2,\n    shift_size=2,\n    num_classes=10,\n    in_channels=1,\n)\n\n```\n\n### Token Learner :white_check_mark: Image/2D\n\n### Vision Transformer :white_check_mark: 1D, :white_check_mark: Image/2D, :white_check_mark: 3D, :white_check_mark: space-time\n```python\nfrom k3im.vit_1d import ViT1DModel\nmodel = ViT1DModel(seq_len=500,\n    patch_size=20,\n    num_classes=10,\n    dim=32,\n    depth=3,\n    heads=8,\n    mlp_dim=64,\n    channels=1,\n    dim_head=64)\n```\n\n\n\n### Vision Transformer with Patch Dropout :white_check_mark: Image/2D\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "",
    "version": "0.0.11",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6caf721282c9f64ba6a2d18217ec1fdf6be42c0983bf6150f659b50e00766117",
                "md5": "fb8861bae9ae03209d73ebe51a377ff8",
                "sha256": "71e9e97082e828aa84d1425d1590381c252cde52d14021e23bff9c8ba74b1008"
            },
            "downloads": -1,
            "filename": "k3im-0.0.11-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "fb8861bae9ae03209d73ebe51a377ff8",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10,<4.0",
            "size": 67713,
            "upload_time": "2023-12-28T21:55:11",
            "upload_time_iso_8601": "2023-12-28T21:55:11.705849Z",
            "url": "https://files.pythonhosted.org/packages/6c/af/721282c9f64ba6a2d18217ec1fdf6be42c0983bf6150f659b50e00766117/k3im-0.0.11-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ca302e7b12c0fa6e2861cb5303c2a07f42cfa972d2f657520ca54e5de8ea5385",
                "md5": "6bcd98ea433e52ef1e15f3a3e35506f4",
                "sha256": "ff64cd6c5586be5c9d226993bc2f8e1ac2ce7dbe54897560005c4c09276f24eb"
            },
            "downloads": -1,
            "filename": "k3im-0.0.11.tar.gz",
            "has_sig": false,
            "md5_digest": "6bcd98ea433e52ef1e15f3a3e35506f4",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10,<4.0",
            "size": 33858,
            "upload_time": "2023-12-28T21:55:13",
            "upload_time_iso_8601": "2023-12-28T21:55:13.459969Z",
            "url": "https://files.pythonhosted.org/packages/ca/30/2e7b12c0fa6e2861cb5303c2a07f42cfa972d2f657520ca54e5de8ea5385/k3im-0.0.11.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-28 21:55:13",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "k3im"
}
        
Elapsed time: 0.23922s