How to use create_stage method in localstack

Best Python code snippet using localstack_python

dope_model.py

Source:dope_model.py Github

copy

Full Screen

...37 str(i_layer + 2), nn.Conv2d(256, 128, kernel_size=3, stride=1, padding=1))38 self.vgg.add_module(str(i_layer + 3), nn.ReLU(inplace=True))39 # print('---Belief------------------------------------------------')40 # _2 are the belief map stages41 self.m1_2 = DopeNetwork.create_stage(128, numBeliefMap, True)42 self.m2_2 = DopeNetwork.create_stage(128 + numBeliefMap + numAffinity, numBeliefMap, False)43 self.m3_2 = DopeNetwork.create_stage(128 + numBeliefMap + numAffinity, numBeliefMap, False)44 self.m4_2 = DopeNetwork.create_stage(128 + numBeliefMap + numAffinity, numBeliefMap, False)45 self.m5_2 = DopeNetwork.create_stage(128 + numBeliefMap + numAffinity, numBeliefMap, False)46 self.m6_2 = DopeNetwork.create_stage(128 + numBeliefMap + numAffinity, numBeliefMap, False)47 # print('---Affinity----------------------------------------------')48 # _1 are the affinity map stages49 self.m1_1 = DopeNetwork.create_stage(128, numAffinity, True)50 self.m2_1 = DopeNetwork.create_stage(128 + numBeliefMap + numAffinity, numAffinity, False)51 self.m3_1 = DopeNetwork.create_stage(128 + numBeliefMap + numAffinity, numAffinity, False)52 self.m4_1 = DopeNetwork.create_stage(128 + numBeliefMap + numAffinity, numAffinity, False)53 self.m5_1 = DopeNetwork.create_stage(128 + numBeliefMap + numAffinity, numAffinity, False)54 self.m6_1 = DopeNetwork.create_stage(128 + numBeliefMap + numAffinity, numAffinity, False)55 def forward(self, x):56 '''Runs inference on the neural network'''57 out1 = self.vgg(x)58 out1_2 = self.m1_2(out1)59 out1_1 = self.m1_1(out1)60 out2 = torch.cat([out1_2, out1_1, out1], 1)61 out2_2 = self.m2_2(out2)62 out2_1 = self.m2_1(out2)63 out3 = torch.cat([out2_2, out2_1, out1], 1)64 out3_2 = self.m3_2(out3)65 out3_1 = self.m3_1(out3)66 out4 = torch.cat([out3_2, out3_1, out1], 1)67 out4_2 = self.m4_2(out4)68 out4_1 = self.m4_1(out4)69 out5 = torch.cat([out4_2, out4_1, out1], 1)70 out5_2 = self.m5_2(out5)71 out5_1 = self.m5_1(out5)72 out6 = torch.cat([out5_2, out5_1, out1], 1)73 out6_2 = self.m6_2(out6)74 out6_1 = self.m6_1(out6)75 return torch.cat([out6_2, out6_1], 1)76 @staticmethod77 def create_stage(in_channels, out_channels, first=False):78 '''Create the neural network layers for a single stage.'''79 model = nn.Sequential()80 mid_channels = 12881 if first:82 padding = 183 kernel = 384 count = 685 final_channels = 51286 else:87 padding = 388 kernel = 789 count = 1090 final_channels = mid_channels91 # First convolution...

Full Screen

Full Screen

stages.py

Source:stages.py Github

copy

Full Screen

...4 Carrega a stage cliente5 :param connection: conexão com o banco de dados6 :return: None7 """8 dwt.create_stage(9 conn_input=connection,10 conn_output=connection,11 schema_in="public",12 table="CLIENTE",13 stg_name="stg_cliente",14 tbl_exists="replace"15 )16def run_stg_endereco(connection):17 """18 Carrega a stage endereco19 :param connection: conexão com o banco de dados20 :return: None21 """22 dwt.create_stage(23 conn_input=connection,24 conn_output=connection,25 schema_in="public",26 table="ENDERECO",27 stg_name="stg_endereco",28 tbl_exists="replace"29 )30def run_stg_forma_pagamento(connection):31 """32 Carrega a stage forma_pagamento33 :param connection: conexão com o banco de dados34 :return: None35 """36 dwt.create_stage(37 conn_input=connection,38 conn_output=connection,39 schema_in="public",40 table="FORMA_PAGAMENTO",41 stg_name="stg_forma_pagamento",42 tbl_exists="replace"43 )44def run_stg_funcionario(connection):45 """46 Carrega a stage funcionario47 :param connection: conexão com o banco de dados48 :return: None49 """50 dwt.create_stage(51 conn_input=connection,52 conn_output=connection,53 schema_in="public",54 table="FUNCIONARIO",55 stg_name="stg_funcionario",56 tbl_exists="replace"57 )58def run_stg_item_venda(connection):59 """60 Carrega a stage item_venda61 :param connection: conexão com o banco de dados62 :return: None63 """64 dwt.create_stage(65 conn_input=connection,66 conn_output=connection,67 schema_in="public",68 table="ITEM_VENDA",69 stg_name="stg_item_venda",70 tbl_exists="replace"71 )72def run_stg_venda(connection):73 """74 Carrega a stage venda75 :param connection: conexão com o banco de dados76 :return: None77 """78 dwt.create_stage(79 conn_input=connection,80 conn_output=connection,81 schema_in="public",82 table="VENDA",83 stg_name="stg_venda",84 tbl_exists="replace"...

Full Screen

Full Screen

patient_stage.py

Source:patient_stage.py Github

copy

Full Screen

...8 for r in Registry.objects.all():9 if r.has_feature(RegistryFeatures.STAGES):10 init_registry_stages_and_rules(r)11def init_registry_stages_and_rules(registry):12 informed_consent = create_stage(registry, 'Informed Consent', None)13 eligibility = create_stage(registry, 'Eligibility', informed_consent)14 pre_screening = create_stage(registry, 'Pre-screening', eligibility)15 screening = create_stage(registry, 'Screening', pre_screening)16 run_in = create_stage(registry, 'Run-in', screening)17 trial = create_stage(registry, 'Trial', run_in)18 _ = create_stage(registry, 'Follow-up', trial)19 if informed_consent and eligibility:20 create_rule(registry, None, 'registered', informed_consent, 1)21 create_rule(registry, informed_consent, 'consented', eligibility, 1)22def create_stage(registry, name, previous_stage):23 stage, created = models.PatientStage.objects.get_or_create(name=name, registry=registry)24 if created and previous_stage:25 stage.allowed_prev_stages.add(previous_stage)26 previous_stage.allowed_next_stages.add(stage)27 return stage if created else None28def create_rule(registry, from_stage, rule, to_stage, order):29 models.PatientStageRule.objects.get_or_create(30 registry=registry,31 from_stage=from_stage, 32 condition=rule, 33 to_stage=to_stage,34 order=order...

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run localstack automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful