Skip to content

I need help with my Architecture, plz #154

@Bennetash

Description

@Bennetash

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions