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

I need help with my Architecture, plz #154

Open
Bennetash opened this issue Jun 20, 2024 · 0 comments
Open

I need help with my Architecture, plz #154

Bennetash opened this issue Jun 20, 2024 · 0 comments

Comments

@Bennetash
Copy link

I am trying to make 2 parallel convolutional architectures with a fully connected fusion layer and an attention block for data. I have this code, could someone help me please?

mport sys
sys.path.append('../')
from pycore.tikzeng import *

Definir tu arquitectura

arch = [
to_head('..'),
to_cor(),
to_begin(),

# Entrada de la imagen
to_input('input_image.jpg', width=5, height=5, name='input'),

# Primera rama convolucional
to_Conv("conv1a", 32, 32, offset="(0,0,0)", to="(input-east)", height=32, depth=32, width=2),
to_Pool("pool1a", offset="(0,0,0)", to="(conv1a-east)", height=16, depth=16, width=1),

# Segunda rama convolucional
to_Conv("conv1b", 32, 32, offset="(1,0,0)", to="(input-east)", height=32, depth=32, width=2),
to_Pool("pool1b", offset="(0,0,0)", to="(conv1b-east)", height=16, depth=16, width=1),

# Conexión a la capa completamente conectada
to_Fc("fc", 64, offset="(2,0,0)", to="(pool1a-east)", height=1, depth=1, width=4, caption="Fully Connected"),
to_connection("pool1a", "fc"),
to_connection("pool1b", "fc"),

# Bloque de atención para datos de sensores
to_input('sensor_data.jpg', width=5, height=5, to="(input-south)", name='sensor_input'),
to_Attention("attention", 16, offset="(0,-3,0)", to="(sensor_input-east)", height=16, depth=16, width=4, caption="Attention Block"),
to_connection("sensor_input", "attention"),

# Capa de salida
to_SoftMax("soft1", 10, "(4,0,0)", "(fc-east)", caption="Output"),
to_connection("fc", "soft1"),

to_end()

]

def main():
file_name = str(sys.argv[0]).split('.')[0]
to_generate(arch, file_name + '.tex')

if name == 'main':
main()

I am basing it on the script example that is in the repository

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

1 participant