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.

vue.config.js 1.7 kB

5 years ago
5 years ago
5 years ago
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /**
  2. * Copyright 2019 Huawei Technologies Co., Ltd.All Rights Reserved.
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. const path = require('path');
  17. /**
  18. * @param {String} dir
  19. * @return {String}
  20. */
  21. function resolve(dir) {
  22. return path.join(__dirname, dir);
  23. }
  24. module.exports = {
  25. publicPath: process.env.NODE_ENV === 'production' ? './' : '/',
  26. outputDir: 'dist',
  27. assetsDir: 'static',
  28. // map
  29. productionSourceMap: false,
  30. configureWebpack: {
  31. devtool: 'source-map',
  32. },
  33. chainWebpack: (config) => {
  34. config.resolve.alias.set('@', resolve('src'));
  35. config.plugins.delete('preload');
  36. config.plugins.delete('prefetch');
  37. config.module
  38. .rule('element-ui')
  39. .test(/element-ui.src.*?js$/)
  40. .use('babel')
  41. .loader('babel-loader')
  42. .end();
  43. },
  44. devServer: {
  45. port: 8085,
  46. disableHostCheck: true,
  47. },
  48. pluginOptions: {
  49. i18n: {
  50. locale: 'zh-cn',
  51. fallbackLocale: 'zh-cn',
  52. localeDir: 'locales',
  53. enableInSFC: true,
  54. },
  55. },
  56. css: {
  57. loaderOptions: {
  58. sass: {
  59. prependData: `
  60. @import "@/assets/css/variable.scss";
  61. `,
  62. },
  63. },
  64. },
  65. };

MindInsight为MindSpore提供了简单易用的调优调试能力。在训练过程中,可以将标量、张量、图像、计算图、模型超参、训练耗时等数据记录到文件中,通过MindInsight可视化页面进行查看及分析。