def test_place_get_consuming_operations(): _, place = init_place() assert place.get_consuming_operations(outputPortIndex=22) is not None stat = get_place_stat(place) assert stat.get_consuming_operations == 1 assert stat.lastArgInt == 22 assert place.get_consuming_operations() is not None stat = get_place_stat(place) assert stat.get_consuming_operations == 2 assert stat.lastArgInt == -1
def test_place_get_output_port(): _, place = init_place() assert place.get_output_port() is not None stat = get_place_stat(place) assert stat.get_output_port == 1 assert stat.lastArgInt == -1 assert place.get_output_port(outputPortIndex=22) is not None stat = get_place_stat(place) assert stat.get_output_port == 2 assert stat.lastArgInt == 22
def test_place_get_source_tensor(): _, place = init_place() assert place.get_source_tensor() is not None stat = get_place_stat(place) assert stat.get_source_tensor == 1 assert stat.lastArgInt == -1 assert place.get_source_tensor(inputPortIndex=22) is not None stat = get_place_stat(place) assert stat.get_source_tensor == 2 assert stat.lastArgInt == 22
def test_place_get_producing_operation(): _, place = init_place() assert place.get_producing_operation(inputPortIndex=22) is not None stat = get_place_stat(place) assert stat.get_producing_operation == 1 assert stat.lastArgInt == 22 assert place.get_producing_operation() is not None stat = get_place_stat(place) assert stat.get_producing_operation == 2 assert stat.lastArgInt == -1
def test_place_get_input_port(): _, place = init_place() assert place.get_input_port() is not None stat = get_place_stat() assert stat.get_input_port == 1 assert stat.lastArgInt == -1 assert place.get_input_port(input_port_index=22) is not None stat = get_place_stat() assert stat.get_input_port == 2 assert stat.lastArgInt == 22
def test_place_get_output_port2(): _, place = init_place() assert place.get_output_port(outputName="abc") is not None stat = get_place_stat(place) assert stat.get_output_port == 1 assert stat.lastArgInt == -1 assert stat.lastArgString == "abc" assert place.get_output_port(outputName="abcd", outputPortIndex=22) is not None stat = get_place_stat(place) assert stat.get_output_port == 2 assert stat.lastArgInt == 22 assert stat.lastArgString == "abcd"
def test_place_get_input_port2(): _, place = init_place() assert place.get_input_port(input_name="abc") is not None stat = get_place_stat() assert stat.get_input_port == 1 assert stat.lastArgInt == -1 assert stat.lastArgString == "abc" assert place.get_input_port(input_name="abcd", input_port_index=22) is not None stat = get_place_stat() assert stat.get_input_port == 2 assert stat.lastArgInt == 22 assert stat.lastArgString == "abcd"
def test_place_is_equal_data(): model, place = init_place() place2 = model.get_place_by_tensor_name("2") assert place.is_equal_data(other=place2) is not None stat = get_place_stat(place) assert stat.is_equal_data == 1 assert stat.lastArgPlace == place2
def test_place_get_source_tensor(): _, place = init_place() assert place.get_source_tensor() is not None stat = get_place_stat() assert stat.get_source_tensor == 1 assert stat.lastArgInt == -1 assert place.get_source_tensor(input_port_index=22) is not None stat = get_place_stat() assert stat.get_source_tensor == 2 assert stat.lastArgInt == 22 assert place.get_source_tensor(input_name="2") is not None stat = get_place_stat() assert stat.get_source_tensor == 3 assert stat.lastArgInt == -1 assert stat.lastArgString == "2" assert place.get_source_tensor(input_name="3", input_port_index=33) is not None stat = get_place_stat() assert stat.get_source_tensor == 4 assert stat.lastArgInt == 33 assert stat.lastArgString == "3"
def test_place_get_producing_operation(): _, place = init_place() assert place.get_producing_operation(input_port_index=22) is not None stat = get_place_stat() assert stat.get_producing_operation == 1 assert stat.lastArgInt == 22 assert place.get_producing_operation() is not None stat = get_place_stat() assert stat.get_producing_operation == 2 assert stat.lastArgInt == -1 assert place.get_producing_operation(input_name="2") is not None stat = get_place_stat() assert stat.get_producing_operation == 3 assert stat.lastArgInt == -1 assert stat.lastArgString == "2" assert place.get_producing_operation(input_name="3", input_port_index=33) is not None stat = get_place_stat() assert stat.get_producing_operation == 4 assert stat.lastArgInt == 33 assert stat.lastArgString == "3"
def test_place_get_consuming_operations(): _, place = init_place() assert place.get_consuming_operations(output_port_index=22) is not None stat = get_place_stat(place) assert stat.get_consuming_operations == 1 assert stat.lastArgInt == 22 assert place.get_consuming_operations() is not None stat = get_place_stat(place) assert stat.get_consuming_operations == 2 assert stat.lastArgInt == -1 assert place.get_consuming_operations(output_name="2") is not None stat = get_place_stat(place) assert stat.get_consuming_operations == 3 assert stat.lastArgInt == -1 assert stat.lastArgString == "2" assert place.get_consuming_operations(output_name="3", output_port_index=33) is not None stat = get_place_stat(place) assert stat.get_consuming_operations == 4 assert stat.lastArgInt == 33 assert stat.lastArgString == "3"
def test_place_get_target_tensor(): _, place = init_place() assert place.get_target_tensor(outputPortIndex=22) is not None stat = get_place_stat(place) assert stat.get_target_tensor == 1 assert stat.lastArgInt == 22 assert place.get_target_tensor() is not None stat = get_place_stat(place) assert stat.get_target_tensor == 2 assert stat.lastArgInt == -1 assert place.get_target_tensor(outputName="2") is not None stat = get_place_stat(place) assert stat.get_target_tensor == 3 assert stat.lastArgInt == -1 assert stat.lastArgString == "2" assert place.get_target_tensor(outputName="3", outputPortIndex=33) is not None stat = get_place_stat(place) assert stat.get_target_tensor == 4 assert stat.lastArgInt == 33 assert stat.lastArgString == "3"
def test_place_get_consuming_ports(): _, place = init_place() assert place.get_consuming_ports() is not None stat = get_place_stat(place) assert stat.get_consuming_ports == 1
def test_place_get_producing_port(): _, place = init_place() assert place.get_producing_port() is not None stat = get_place_stat(place) assert stat.get_producing_port == 1
def test_place_get_names(): _, place = init_place() assert place.get_names() is not None stat = get_place_stat(place) assert stat.get_names == 1
def test_place_is_output(): _, place = init_place() assert place.is_output() is not None stat = get_place_stat(place) assert stat.is_output == 1