diff --git a/keras_hub/src/models/backbone.py b/keras_hub/src/models/backbone.py index 6e5f36afaa..41bccf04b3 100644 --- a/keras_hub/src/models/backbone.py +++ b/keras_hub/src/models/backbone.py @@ -130,7 +130,8 @@ def from_preset( 1. a built-in preset identifier like `'bert_base_en'` 2. a Kaggle Models handle like `'kaggle://user/bert/keras/bert_base_en'` 3. a Hugging Face handle like `'hf://user/bert_base_en'` - 4. a path to a local preset directory like `'./bert_base_en'` + 4. a ModelScope handle like `'modelscope://user/bert_base_en'` + 5. a path to a local preset directory like `'./bert_base_en'` This constructor can be called in one of two ways. Either from the base class like `keras_hub.models.Backbone.from_preset()`, or from diff --git a/keras_hub/src/models/sam/sam_prompt_encoder.py b/keras_hub/src/models/sam/sam_prompt_encoder.py index 81415f97f3..12b77f4a7d 100644 --- a/keras_hub/src/models/sam/sam_prompt_encoder.py +++ b/keras_hub/src/models/sam/sam_prompt_encoder.py @@ -67,7 +67,9 @@ def __init__( self.activation = activation self.positional_embedding_layer = RandomFrequencyPositionalEmbeddings( - num_positional_features=self.hidden_size // 2, scale=1 + num_positional_features=self.hidden_size // 2, + scale=1, + dtype=self.dtype, ) self.foreground_point_embed = keras.layers.Embedding(