摘要:
1. 合并,提取音视频 (1)单独提取视频(不含音频流) ffmpeg -i video.mp4 -vcodec copy -an video_silent.mp4 -an:表示不输出音频 (2)单独提取音频(不含视频流) ffmpeg -i input.mp4 -vn -ar 44100 -ac 阅读全文
摘要:
1. Debian 上安装 sudo apt-get install gerbera 2. 打开UI界面 默认是关闭的,配置文件/etc/gerbera/config.xml,把enabled改为'yes' <config> <server> <ui enabled="no" show-toolti 阅读全文
摘要:
batch_size , seq ,num_layers = 2,3,2 input_size , hidden_size = 2,3 input = torch.randn(batch_size, seq, input_size) h_0 = torch.zeros(num_layers,batc 阅读全文
摘要:
rnn = nn.RNN(input_size=4,hidden_size=3,num_layers=2,batch_first=True, bidirectional = True) input = torch.randn(1,5,4) output , h_n = rnn(input) prin 阅读全文
摘要:
batch_first – If True, then the input and output tensors are provided as (batch, seq, feature) instead of (seq, batch, feature). Note that this does n 阅读全文
摘要:
# Define LSTM class Lstm(nn.Module): def __init__(self, input_size, hidden_size=2, output_size=1, num_layers=1): super().__init__() self.layer1 = nn.L 阅读全文
摘要:
x=np.arange(1,100) y = np.sin(0.1*x) def D_1(x,y): n = len(x) d = np.zeros(n) d[0] = (y[1]-y[0])/(x[1]-x[0]) d[n-1] = (y[n-1]-y[n-2])/(x[n-1]-x[n-2]) 阅读全文
摘要:
x = [1,2,3] y1 = np.array([4,5,6]) y2 = np.array([5,6,7]) y3 = np.array([7,6,5]) width = 0.2 Sum = y1+y2+y3 per = 100*y2/Sum #添加在中间,旋转90度 def add_mid( 阅读全文
摘要:
```python def firstorder(T,K,t,In): # T 时间常数 # K 增益 Out = np.zeros(len(In)) for i in range(1,len(t)): dt = t[i]-t[i-1] s = T/dt Out[i] = K*In[i]/(s+1) 阅读全文
摘要:
x = np.arange(0,101) wn = np.random.rand(101) y1 = -1+0.02*x+0.1*wn y2 = np.sin(0.5*x) y3 = 0.0001*x**2-0.03*x+1 y4 = 0.8*np.cos(x) fig,ax1 = plt.subp 阅读全文