More segment-anything. (#763)

* More segment-anything.

* Split the model in multiple files.

* Start adding the transformer.

* Add the attention block.

* Move the MLP Block.
This commit is contained in:
Laurent Mazare
2023-09-07 08:28:30 +02:00
committed by GitHub
parent 000fa00e31
commit 8c991df394
5 changed files with 574 additions and 349 deletions

View File

@ -130,6 +130,17 @@ pub struct ConvTranspose2dConfig {
// TODO: support groups.
}
impl Default for ConvTranspose2dConfig {
fn default() -> Self {
Self {
padding: 0,
output_padding: 0,
stride: 1,
dilation: 1,
}
}
}
#[derive(Debug)]
pub struct ConvTranspose2d {
weight: Tensor,