You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.js 1.2 kB

4 years ago
3 years ago
4 years ago
3 years ago
4 years ago
4 years ago
1234567891011121314151617181920212223242526272829303132
  1. /** Copyright 2020 Tianshu AI Platform. All Rights Reserved.
  2. *
  3. * Licensed under the Apache License, Version 2.0 (the "License");
  4. * you may not use this file except in compliance with the License.
  5. * You may obtain a copy of the License at
  6. *
  7. * http://www.apache.org/licenses/LICENSE-2.0
  8. *
  9. * Unless required by applicable law or agreed to in writing, software
  10. * distributed under the License is distributed on an "AS IS" BASIS,
  11. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. * See the License for the specific language governing permissions and
  13. * limitations under the License.
  14. * =============================================================
  15. */
  16. import { reactive } from '@vue/composition-api';
  17. import store from '@/store';
  18. /**
  19. * 使用 hooks 实现类似 mapGetters
  20. * 无法根据 store 的实时变更进行进行调整,只有调用时会拉取一次
  21. * @param {Array<String>} getters getters 列表,对应 mapGetters 的数组
  22. */
  23. export function useMapGetters(getters) {
  24. const map = reactive({});
  25. for (const getter of getters) {
  26. Object.assign(map, { [getter]: store.getters[getter] });
  27. }
  28. return map;
  29. }

一站式算法开发平台、高性能分布式深度学习框架、先进算法模型库、视觉模型炼知平台、数据可视化分析平台等一系列平台及工具,在模型高效分布式训练、数据处理和可视分析、模型炼知和轻量化等技术上形成独特优势,目前已在产学研等各领域近千家单位及个人提供AI应用赋能