tensorflow

ValueError: Input 0 of layer sequential is incompatible with the layer: : expected min_ndim=4, found ndim=2. Full shape received: [None, 2584]

混江龙づ霸主 提交于 2021-02-09 05:55:40
问题 I'm working in a project that isolate vocal parts from an audio. I'm using the DSD100 dataset, but for doing tests I'm using the DSD100subset dataset from I only use the mixtures and the vocals. I'm basing this work on this article First I process the audios to extract a spectrogram and put it on a list, with all the audios forming four lists (trainMixed, trainVocals, testMixed, testVocals). Like this: def to_spec(wav, n_fft=1024, hop_length=256): return librosa.stft(wav, n_fft=n_fft, hop

ValueError: Input 0 of layer sequential is incompatible with the layer: : expected min_ndim=4, found ndim=2. Full shape received: [None, 2584]

只愿长相守 提交于 2021-02-09 05:55:34
问题 I'm working in a project that isolate vocal parts from an audio. I'm using the DSD100 dataset, but for doing tests I'm using the DSD100subset dataset from I only use the mixtures and the vocals. I'm basing this work on this article First I process the audios to extract a spectrogram and put it on a list, with all the audios forming four lists (trainMixed, trainVocals, testMixed, testVocals). Like this: def to_spec(wav, n_fft=1024, hop_length=256): return librosa.stft(wav, n_fft=n_fft, hop

Keras Concatenate TypeError: __init__() got multiple values for argument 'axis'

两盒软妹~` 提交于 2021-02-09 05:49:14
问题 I am currently trying to recreate the Unet. At the "upconvolution" part where the outputs of two layers needs to be merged I got the mentioned error. (TypeError: init () got multiple values for argument 'axis') Keras Version: 2.0.6 Tensorflow-gpu: 1.2.1 Code snippet: import gzip import os from six.moves import urllib import tensorflow as tf import numpy as np from keras.models import Sequential, Model from keras.layers import Input, Dropout, Flatten, Concatenate from keras.layers import

Keras Concatenate TypeError: __init__() got multiple values for argument 'axis'

与世无争的帅哥 提交于 2021-02-09 05:47:45
问题 I am currently trying to recreate the Unet. At the "upconvolution" part where the outputs of two layers needs to be merged I got the mentioned error. (TypeError: init () got multiple values for argument 'axis') Keras Version: 2.0.6 Tensorflow-gpu: 1.2.1 Code snippet: import gzip import os from six.moves import urllib import tensorflow as tf import numpy as np from keras.models import Sequential, Model from keras.layers import Input, Dropout, Flatten, Concatenate from keras.layers import

tensorflow2.0第2章 Tensorflow keras实战

倖福魔咒の 提交于 2021-02-09 02:05:33
本门课程的基础章节,详细介绍了如何使用tf.keras进行模型的搭建以及大量的深度学习的理论知识。理论知识包括分类问题、回归问题、损失函数、神经网络、激活函数、dropout、批归一化、深度神经网络、Wide&Deep模型、密集特征、稀疏特征、超参数搜索等及其在图像分类、房价预测上的实现。 课程代码的tensorflow版本: 大部分代码是tensorflow2.0的; 课程以tf.keras API为主,因为keras在1.3以后的版本就引入进来了,因而部分代码可以在tf1.3+运行; 另外有少量tensorflow1.*版本代码,这些版本的代码并不能在2.0上运行,因为很多API都已经过时了。 理论部分: tensorflow-keras简介; 分类问题、回归问题、损失函数; 神经网络、激活函数、批归一化、Dropout; wide&deep模型; 超参数搜索。 实战部分: keras搭建分类模型; keras回调函数; keras搭建回归模型; keras搭建深度神经网络; keras实现wide&deep模型; keras与scikit-learn实现超参数搜索。 tensorflow-keras简介 keras是什么: 基于python的高级神经网络API,它是一套API,而不是一个完整的库; Francois Chollet(现在在Google,tf

腾讯IEG开源GAME AI SDK:自动化测试吃鸡、MOBA类游戏

心不动则不痛 提交于 2021-02-09 00:09:44
视学算法报道 编辑:陈萍、魔王 转载自公众号:机器之心 SDK 还能自动玩游戏? 这个 SDK 有点「酷」 。 近日,腾讯互娱(IEG)开源了一款名为 GAME AI SDK 的自动化测试平台,该平台封装好了多种工具供开发者使用,目前支持的游戏类型有跑酷类、吃鸡类、射击类、MOBA 类等。 项目地址:https://github.com/Tencent/GameAISDK 平台内置的「天天酷跑」示例。左图为未训练随机做动作,右图是训练好的效果。 SDK(软件开发工具包)一般是软件工程师为特定的软件包、软件框架、硬件平台、操作系统等创建应用软件时可使用的开发工具集合。 似乎有些抽象。在实际项目中,我们只需记住,SDK 是手游渠道提供的,集成了用户登录、社区功能、社交分享功能、数据后台统计功能的功能模块。接入 SDK 后,游戏厂商和渠道都要对 SDK 包进行测试,测试通过才能上线。 看了上文展示的酷跑动图效果,是不是想上手试试吃鸡类、射击类的游戏体验呢?这个开源项目可以满足你的需求,它支持使用者进行项目接入以及二次开发。 AI SDK 平台 AI SDK 平台是一个基于游戏图像来开发游戏 AI 的开源工具包。工具包主要完成了 UI 检测、游戏内元素识别、AI 算法(DQN、IM)等功能。开发者可以基于此工具包完成游戏自动化测试。 目前该平台已支持的游戏类型有跑酷类、吃鸡类、射击类

Where is `_softmax_cross_entropy_with_logits` defined in tensorflow?

无人久伴 提交于 2021-02-08 14:00:09
问题 I am trying to see how softmax_cross_entropy_with_logits_v2() is implemented. It calls _softmax_cross_entropy_with_logits() . But I don't see where the latter is defined. Does anybody know how to locate its definition? $ ack '\b_softmax_cross_entropy_with_logits\b' tensorflow/compiler/tests/binary_ops_test.py 176: gen_nn_ops._softmax_cross_entropy_with_logits, tensorflow/python/kernel_tests/xent_op_test.py 52: loss, backprop = gen_nn_ops._softmax_cross_entropy_with_logits( 75: loss, backprop

Error : Failed to create temp directory “C:\Users\user\AppData\Local\Temp\conda-<RANDOM>\”

风格不统一 提交于 2021-02-08 13:33:09
问题 When I try to Activate "conda activate tensorflow_cpu" conda activate tensorflow_cpu Error : Failed to create temp directory "C:\Users\user\AppData\Local\Temp\conda-\" 回答1: It is due to a bug from conda developers. The bug is the temp path is having names with spaces, so to overcome please reassign the Env Variables TEMP, TMP. (for windows) go to environment variables In "User Variables for " section look for TEMP, TMP double click on TMP and in "variable value", type "C:\conda_tmp" similarly

毕业设计之「测试实验及结果分析」(二)

北城余情 提交于 2021-02-08 13:23:10
阅读本文大概需要 8 分钟。 基于AlexNet完成五种花的训练和识别 花分类数据集获取及项目简介 在本例中,我们将使用通过Python爬虫技术获取的 不具备版权 的3762张样本图片,包括5个类别:其中daisy(菊花)633张,dandelion(蒲公英)898张,roses(玫瑰)641张,sunflowers(太阳花)699张,tulips(郁金香)799张; 训练集图片共3306张,同样也是5种类别,其中daisy(菊花)570张,dandelion(蒲公英)809张,roses(玫瑰)577张,sunflowers(太阳花)630张,tulips(郁金香)720张; 测试集图片共364张,也是5种类别,其中daisy(菊花)53张,dandelion(蒲公英)89张,roses(玫瑰)64张,sunflowers(太阳花)69张,tulips(郁金香)79张; 有了数据集之后,我们将搭建AlexNet卷积神经网络,通过对图片的训练,来完成对要识别图片的判断,要注意的一点,因为此项目中样本集中图片总量较小,所以相比第一个例子,识别率可能会有所下降。 代码及最终效果展示 接下来,我们给出本案例的核心代码,即AlexNet网络模型搭建的核心代码: from TensorFlow.keras import layers, models, Model, Sequential

tensorflow.python.framework.errors_impl.UnknownError: Failed to rename: Input/output error

社会主义新天地 提交于 2021-02-08 13:15:26
问题 When I apply tensorflow eager mode to train a classifier, I met the following error. Steps 151, Train loss is 0.00039766659028828144, learning_rate is 0.009999999776482582 Traceback (most recent call last): File "E:/Tensorflow_Experiments/train_alexnet.py", line 1354, in <module> The error occurs after several iterations, as shown above. But the iteration number is different for successional executions. File "C:\Software\Anaconda3\lib\site-packages\tensorflow\contrib\eager\python\saver.py",