deep-learning

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

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

Tensorflow 2.0: How can I fully customize a Tensorflow training loop like I can with PyTorch?

假装没事ソ 提交于 2021-02-08 11:42:17
问题 I used to use Tensorflow a lot before, but moved over to Pytorch because it was just a lot easier to debug. The nice thing I found with PyTorch is that I have to write my own training loop, so I can step through the code and find errors. I can fire up pdb and check the tensor shapes and transformations, etc., without difficulty. In Tensorflow I was using the model.fit() function all the time, and so any error message I got was like 6 pages of C code where the error message did not give me any

Could not import PIL.Image even if Pillow already installed?

冷暖自知 提交于 2021-02-08 11:12:01
问题 I'm going through chapter 5 of the book Deep Learning with R (https://livebook.manning.com/book/deep-learning-with-r/chapter-5/112). When running the code below, the following error appears: Error in py_iter_next(it, completed) : ImportError: Could not import PIL.Image. The use of load_img requires PIL. All answers with regard to this error message recommend using pip install pillow . When I run this in my Terminal, the following appears: Requirement already satisfied: pillow in /anaconda3

Could not import PIL.Image even if Pillow already installed?

旧巷老猫 提交于 2021-02-08 11:11:35
问题 I'm going through chapter 5 of the book Deep Learning with R (https://livebook.manning.com/book/deep-learning-with-r/chapter-5/112). When running the code below, the following error appears: Error in py_iter_next(it, completed) : ImportError: Could not import PIL.Image. The use of load_img requires PIL. All answers with regard to this error message recommend using pip install pillow . When I run this in my Terminal, the following appears: Requirement already satisfied: pillow in /anaconda3

Could not import PIL.Image even if Pillow already installed?

我与影子孤独终老i 提交于 2021-02-08 11:10:59
问题 I'm going through chapter 5 of the book Deep Learning with R (https://livebook.manning.com/book/deep-learning-with-r/chapter-5/112). When running the code below, the following error appears: Error in py_iter_next(it, completed) : ImportError: Could not import PIL.Image. The use of load_img requires PIL. All answers with regard to this error message recommend using pip install pillow . When I run this in my Terminal, the following appears: Requirement already satisfied: pillow in /anaconda3

Could not import PIL.Image even if Pillow already installed?

笑着哭i 提交于 2021-02-08 11:06:17
问题 I'm going through chapter 5 of the book Deep Learning with R (https://livebook.manning.com/book/deep-learning-with-r/chapter-5/112). When running the code below, the following error appears: Error in py_iter_next(it, completed) : ImportError: Could not import PIL.Image. The use of load_img requires PIL. All answers with regard to this error message recommend using pip install pillow . When I run this in my Terminal, the following appears: Requirement already satisfied: pillow in /anaconda3

Keras loss becomes nan only at epoch end

寵の児 提交于 2021-02-08 10:30:21
问题 I am observing some strange behavior from Keras. I am training a small model where the training loss becomes nan only at the end of the first epoch. So if I have 100 batches, and I terminate training at batch 99, then resume for another 99 it trains fine. Otherwise, once it reaches the end of an epoch it always returns nan. I am using a custom loss function: def corr(x, y): xc = x - K.mean(x) yc = y - K.mean(y) r_num = K.mean(xc*yc) r_den = K.std(x)*K.std(y) return r_num/r_den And I have

Prediction of a discrete numerical target. Multiclass Classifier or Regressor?

喜夏-厌秋 提交于 2021-02-08 10:16:24
问题 In brief, I am trying to come up with a ML (and later DL model) for predicting control input variable of my computer simulation model, based on all other model input variables - let's call them environmental variables. Whether the simulation gives a convergent result or not depends on the value of the control variable. The database for the problem has been generated in a long, iterative simulation run with different scenarios. It consists of all environmental inputs, the control input value,

Prediction of a discrete numerical target. Multiclass Classifier or Regressor?

旧城冷巷雨未停 提交于 2021-02-08 10:15:22
问题 In brief, I am trying to come up with a ML (and later DL model) for predicting control input variable of my computer simulation model, based on all other model input variables - let's call them environmental variables. Whether the simulation gives a convergent result or not depends on the value of the control variable. The database for the problem has been generated in a long, iterative simulation run with different scenarios. It consists of all environmental inputs, the control input value,