Skip to content

Commit 9ee3d73

Browse files
committed
update readme and reformat
1 parent 9a19fed commit 9ee3d73

8 files changed

Lines changed: 10 additions & 4 deletions

File tree

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# ___Keras_cv_attention_models___
22
***
3-
- **WARNING: currently NOT compatible with `keras 3.0`, if using `tensorflow>=2.16.0`, needs to install `pip install tf-keras~=2.16` manually.**
4-
- **coco_train_script.py is under testing. Still struggling for this...**
3+
- **WARNING: currently NOT compatible with `keras 3.0`, if using `tensorflow>=2.16.0`, needs to install `pip install tf-keras~=2.16` manually. While importing, import this package ahead of Tensorflow, or set `export TF_USE_LEGACY_KERAS=1`.**
4+
- **It's not recommended downloading and loading model from h5 file directly, better building model and loading weights like `import kecam; mm = kecam.models.LCNet050()`.**
5+
- **coco_train_script.py for TF is still under testing...**
56
<!-- TOC depthFrom:1 depthTo:6 withLinks:1 updateOnSave:1 orderedList:0 -->
67

78
- [___>>>> Roadmap and todo list <<<<___](https://github.com/leondgarse/keras_cv_attention_models/wiki/Roadmap)
@@ -109,7 +110,6 @@
109110

110111
# General Usage
111112
## Basic
112-
- **Currently recommended TF version is `tensorflow==2.11.1`. Expecially for training or TFLite conversion**.
113113
- **Default import** will not specific these while using them in READMEs.
114114
```py
115115
import os

keras_cv_attention_models/llama2/llama2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ def causal_self_attention_with_cache(inputs, start_pos=0, max_batch_size=0, bloc
158158
key = layers.Reshape([-1, num_kv_heads, key_dim], name=name + "key_reshape")(key)
159159
key = apply_positional_encoding_rotary(key, rope, start_pos, is_kv_cache, name=name + "key_")
160160
if is_kv_cache: # Use KV cache if max_batch_size specified
161-
key = KVCache(max_batch_size=max_batch_size, max_seq_len=block_size, name=name + "key_cahce")([key, start_pos])
161+
key = KVCache(max_batch_size=max_batch_size, max_seq_len=block_size, name=name + "key_cache")([key, start_pos])
162162
key = functional.transpose(key, [0, 2, 3, 1])
163163

164164
value = layers.Reshape([-1, num_kv_heads, key_dim], name=name + "value_reshape")(value)

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
""" Setup
22
"""
3+
34
from setuptools import setup, find_packages
45
from codecs import open
56
from os import path

setup_kecam.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
""" Setup
22
"""
3+
34
from setuptools import setup, find_packages
45
from codecs import open
56
from os import path

tests/test_layers.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import sys
2+
23
sys.path.append(".")
34
import keras_cv_attention_models # Needs to set TF_USE_LEGACY_KERAS=1 env firstly
45

tests/test_models.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import sys
2+
23
sys.path.append(".")
34
import keras_cv_attention_models # Needs to set TF_USE_LEGACY_KERAS=1 env firstly
45

tests/test_models_tf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import sys
2+
23
sys.path.append(".")
34
import keras_cv_attention_models # Needs to set TF_USE_LEGACY_KERAS=1 env firstly
45

tests/test_switch_to_deploy_tf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import sys
2+
23
sys.path.append(".")
34
import keras_cv_attention_models # Needs to set TF_USE_LEGACY_KERAS=1 env firstly
45

0 commit comments

Comments
 (0)