ftl_transfer_variable.py 3.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. #
  4. # Copyright 2019 The FATE Authors. All Rights Reserved.
  5. #
  6. # Licensed under the Apache License, Version 2.0 (the "License");
  7. # you may not use this file except in compliance with the License.
  8. # You may obtain a copy of the License at
  9. #
  10. # http://www.apache.org/licenses/LICENSE-2.0
  11. #
  12. # Unless required by applicable law or agreed to in writing, software
  13. # distributed under the License is distributed on an "AS IS" BASIS,
  14. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15. # See the License for the specific language governing permissions and
  16. # limitations under the License.
  17. #
  18. ################################################################################
  19. #
  20. # AUTO GENERATED TRANSFER VARIABLE CLASS. DO NOT MODIFY
  21. #
  22. ################################################################################
  23. from federatedml.transfer_variable.base_transfer_variable import BaseTransferVariables
  24. # noinspection PyAttributeOutsideInit
  25. class FTLTransferVariable(BaseTransferVariables):
  26. def __init__(self, flowid=0):
  27. super().__init__(flowid)
  28. self.guest_components = self._create_variable(name='guest_components', src=['guest'], dst=['host'])
  29. self.y_overlap_2_phi_2 = self._create_variable(name='y_overlap_2_phi_2', src=['guest'], dst=['host'])
  30. self.y_overlap_phi = self._create_variable(name='y_overlap_phi', src=['guest'], dst=['host'])
  31. self.mapping_comp_a = self._create_variable(name='mapping_comp_a', src=['guest'], dst=['host'])
  32. self.stop_flag = self._create_variable(name='stop_flag', src=['guest'], dst=['host'])
  33. self.host_components = self._create_variable(name='host_components', src=['host'], dst=['guest'])
  34. self.overlap_ub = self._create_variable(name='overlap_ub', src=['host'], dst=['guest'])
  35. self.overlap_ub_2 = self._create_variable(name='overlap_ub_2', src=['host'], dst=['guest'])
  36. self.mapping_comp_b = self._create_variable(name='mapping_comp_b', src=['host'], dst=['guest'])
  37. self.host_side_gradients = self._create_variable(name='host_side_gradients', src=['host'], dst=['guest'])
  38. self.guest_side_gradients = self._create_variable(name='guest_side_gradients', src=['guest'], dst=['host'])
  39. self.guest_side_const = self._create_variable(name='guest_side_const', src=['guest'], dst=['host'])
  40. self.encrypted_loss = self._create_variable(name='encrypted_loss', src=['guest'], dst=['host'])
  41. self.decrypted_loss = self._create_variable(name='decrypted_loss', src=['host'], dst=['guest'])
  42. self.decrypted_guest_gradients = self._create_variable(
  43. name='decrypted_guest_gradients', src=['host'], dst=['guest'])
  44. self.decrypted_guest_const = self._create_variable(name='decrypted_guest_const', src=['host'], dst=['guest'])
  45. self.decrypted_host_gradients = self._create_variable(
  46. name='decrypted_host_gradients', src=['guest'], dst=['host'])
  47. self.predict_stop_flag = self._create_variable(name='predict_stop_flag', src=['host'], dst=['guest'])
  48. self.predict_host_u = self._create_variable(name='predict_host_u', src=['host'], dst=['guest'])
  49. self.encrypted_predict_score = self._create_variable(
  50. name='encrypted_predict_score', src=['guest'], dst=['host'])
  51. self.masked_predict_score = self._create_variable(name='masked_predict_score', src=['host'], dst=['guest'])
  52. self.final_predict_score = self._create_variable(name='final_predict_score', src=['guest'], dst=['host'])
  53. self.predict_batch_num = self._create_variable(name='predict_batch_num', src=['host'], dst=['guest'])