Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

is it typo in UnitExtractor? self.collate = Collater(pad_value=2, pad_to_multiple=2) #255

Closed
seastar105 opened this issue Dec 7, 2023 · 1 comment
Assignees

Comments

@seastar105
Copy link

class UnitExtractor(nn.Module):
"""Unit Extractor which converts raw audio into units."""
def __init__(
self,
model_name_or_card: Union[str, AssetCard],
kmeans_uri: str,
device: Device,
dtype: DataType = torch.float32,
):
super().__init__()
wav2vec2_model = load_wav2vec2_model(
model_name_or_card, device=device, dtype=dtype
)
wav2vec2_model.eval()
assert isinstance(wav2vec2_model, Wav2Vec2Model)
self.model = Wav2Vec2LayerOutputModel(wav2vec2_model)
self.decode_audio = AudioDecoder(dtype=torch.float32, device=device)
self.collate = Collater(pad_value=2, pad_to_multiple=2)
self.kmeans_model = KmeansModel(kmeans_uri, device, dtype)
self.device = device
self.dtype = dtype

UnitExtractor collates batch using Collater(pad_value=2, pad_to_multiple=2). it seems unusual to use pad_value as 2. is it correct? or typo?

@seastar105 seastar105 changed the title is it typo in UnitExtractor? is it typo in UnitExtractor? self.collate = Collater(pad_value=2, pad_to_multiple=2) Dec 7, 2023
@kauterry
Copy link
Contributor

kauterry commented Dec 9, 2023

You are right, it is incorrect, I fix it in #251

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants