memo
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
単語検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
* 書式保持メモ [#sda4f9c8]
/* Curl Test *******************************************...
s4 cl_funcs::curlTest( void ) ...
{ ...
s4 rtnCod = RET_OK; ...
TCHAR strBuf[BUFF_SIZE_MERE] = _T(""); ...
http_client hC( _T("http://192.168.3.6:8000/gen/") )...
...
http_request request( methods::GET ); ...
auto res = hC.request( request ).get(); ...
...
// http_request request( methods::POST ); ...
// request.headers().add( _T("Content-Type"), _T("app...
// request.headers().add( _T("Content-Length"), _T("1...
// auto data = vector< u1 >( 10, 'A' ); ...
// ...
// request.set_body( data ); ...
// tstring str = uB.to_string(); ...
// ...
// auto t1( hC.request( methods::GET, str ) ); ...
// auto t1( hC.request( request ).get() );
// auto t1( response = hc.request(request).get();
// auto res = hC.request( request ).get();
// auto res = hC.request( methods::POST, _T(""), data...
// auto res = hC.request( methods::POST, _T(""), data...
// auto res = hC.request( methods::POST, _T("") ).get...
// http_response res = hC.request( methods::GET ).get...
...
for ( ; ; ) ...
{ ...
TCHAR body[BUFF_SIZE_MERE]; ...
_sntprintf_s( body, _countof(body), _TRUNCATE, ...
_T("%s"), (TCHAR*)(res.extract_str...
MessageBox( NULL, body, ...
APP_NAME, MB_ICONWARNING | MB_OK ); ...
...
// hC.request(methods::GET).then([](http_response...
// {
// TCHAR body[BUFF_SIZE_MERE]; ...
// _sntprintf_s( body, _countof(body), _TRUNC...
// _T("%s"), (TCHAR*)(res.extra...
// MessageBox( NULL, body, ...
// APP_NAME, MB_ICONWARNING | MB_...
//// // Print the status code.
//// std::wostringstream ss;
//// ss << L"Server returned returned status ...
//// std::wcout << ss.str();
////
//// // TODO: Perform actions here reading fr...
//// auto bodyStream = response.body();
////
//// // In this example, we print the length ...
//// ss.str(std::wstring());
//// ss << L"Content length is " << response....
//// std::wcout << ss.str();
// }); ...
// ...
// t1.then(
// [](http_response res)
// { ...
// TCHAR body[BUFF_SIZE_MERE]; ...
//// auto body2 = res.extract_string().get();
//// char body3[BUFF_SIZE_MERE];
//// snprintf( body3, _countof(body3), "%s", ...
// ...
//// MessageBox( NULL, (TCHAR*)msg.c_str(), ...
// _sntprintf_s( body, _countof(body), _TRUNC...
// _T("%s"), (TCHAR*)(res.extra...
//// MessageBox( NULL, (TCHAR*)(res.extract_s...
// MessageBox( NULL, body, ...
// APP_NAME, MB_ICONWARNING | MB_...
// }
// ).wait(); ...
...
...
break; ...
} ...
...
return( rtnCod ); ...
} ...
//*Curl Test *******************************************...
/* Write Schedule Patterns Drums ***********************...
s4 cl_nn::writeSch_MDG( u4_ms (&vd_mSet)[SCH_TYPE_NUM], ...
HANDLE vd_OUFO, HANDLE vd_OUFO_TG...
{ ...
s4 rtnCod = ZERO; ...
...
// u4_ms_it bufIt; ...
// s4 vLeft = ZERO; ...
// s4 vRight = ZERO; ...
// s4 len = ZERO; ...
//// s4 cnt = ZERO; ...
// ...
// ...
u4_ms_it lower; ...
u4_ms_it upper; ...
//// TCHAR strFmt[BUFF_SIZE_SHORT] = _T(""); ...
char strFmt[BUFF_SIZE_SHORT] = ""; ...
// s4 r[PARTS_NUM_MAIN] = { NEG, NEG, NEG, NEG }; ...
// s4 barData = ZERO; ...
// s4 spacer = ZERO; ...
// s4 sLen = ZERO; ...
// s4 tCnts = ONE; ...
// char eos[BUFF_SIZE_SHORT] = ".\n"; ...
s4 sPos = ZERO; ...
s4 cPos = ZERO; ...
s4 ePos = ZERO; ...
s4 vLen = ZERO; ...
s4 wLen = ZERO; ...
s4 cLen = ZERO; ...
...
vd_sch_conf;
...
for ( ; ; ) ...
{ ...
if( true == vd_mSet[DRUMS].empty() ) ...
{ ...
rtnCod = RET_NG; ...
break; ...
} ...
...
lower = vd_mSet[DRUMS].begin(); ...
upper = vd_mSet[DRUMS].end(); ...
// barData = *lower; ...
for( ; upper != lower; lower++ ) ...
{ ...
if( ZERO != sPos ) ...
{ ...
cPos = getX(*lower); ...
vLen = cPos - ePos; ...
wLen = ePos - sPos; ...
cLen = cPos - sPos; ...
if( ZERO == vLen ) ...
{ ...
continue; ...
} ...
else if( LONGEST_VOID_LEN_D < vLen ) ...
{ ...
if( SHORTEST_SENTS_LEN_D > wLen ) ...
{ ...
} ...
else ...
{ ...
// ePos = sPos + GRID_H; ...
if( NULL == vd_OUFO ) ...
{ ...
obj_nn.outDG( vd_mSet[DRUMS]...
} ...
else ...
{ ...
obj_nn.outMD( vd_mSet, sPos,...
} ...
} ...
sPos = cPos; ...
rePos = ePos; ...
ePos = cPos + GRID_H; ...
} ...
else ...
{ ...
if( SENTS_LEN_D <= cLen ) ...
{ ...
if( NULL == vd_OUFO ) ...
{ ...
obj_nn.outDG( vd_mSet[DRUMS]...
} ...
else ...
{ ...
obj_nn.outMD( vd_mSet, sPos,...
} ...
sPos = cPos; ...
} ...
rePos = ePos; ...
ePos = cPos + GRID_H; ...
} ...
} ...
else ...
{ ...
sPos = getX(*lower); ...
rePos = sPos + GRID_H; ...
ePos = sPos + GRID_H; ...
} ...
} ...
...
wLen = ePos - sPos; ...
if( SHORTEST_SENTS_LEN_D <= wLen ) ...
{ ...
if( NULL == vd_OUFO ) ...
{ ...
obj_nn.outDG( vd_mSet[DRUMS], sPos, ePos...
} ...
else ...
{ ...
obj_nn.outMD( vd_mSet, sPos, ePos, vd_OU...
} ...
} ...
...
break; ...
} ...
...
return( rtnCod ); ...
} ...
//*Write Schedule Patterns Drums ***********************...
*** https://qiita.com/okoppe8/items/b56499fc04e6c2193b9d ...
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'formatters': {
'production': {
'format': '%(asctime)s [%(levelname)s] %(pro...
'%(pathname)s:%(lineno)d %(message...
},
},
'handlers': {
'file': {
'class': 'logging.handlers.TimedRotatingFile...
'filename': '/var/log/django/django.log',
'formatter': 'production',
# 'level': 'INFO',
'when': 'D',
'interval': 1,
'backupCount': 14,
},
},
'loggers': {
'': {
'handlers': ['file'],
# 'level': 'INFO',
'propagate': False,
},
'django': {
'handlers': ['file'],
# 'level': 'INFO',
'propagate': False,
},
},
import sys
import os
import glob
import random
import shutil
import errno
args = sys.argv
try:
os.makedirs( "./test" )
os.makedirs( "./train" )
os.makedirs( "./valid" )
except OSError as e:
if e.errno != errno.EEXIST:
raise e
fileList = glob.glob( "./*.mid*" )
#print( "hello" )
#print( args[1] )
for file in fileList:
randNum = random.randint(0,11)
if 0 == randNum:
shutil.copy( file, "./test" )
elif 1 == randNum:
shutil.copy( file, "./valid" )
else:
shutil.copy( file, "./train" )
sys.exit()
#include <stdio.h>
#include <time.h>
#include <stdlib.h>
int main( void )
{
int rtnCod = 0;
char strArr[10][9] = { "", };
int intArr[10] = { 0, };
int cnt = 0;
int num = 0;
srand( (unsigned int)time( NULL ) );
for( cnt = 0; 10 > cnt; cnt++ )
{
intArr[cnt] = rand();
printf( "%x\r\n", intArr[cnt] );
snprintf( strArr[cnt], 9, "%x", intArr[cnt] );
printf( "%s\r\n", strArr[cnt] );
num = strtol( strArr[cnt], NULL, 16 );
printf( "%x\r\n", num );
}
return( rtnCod );
}
#include <stdio.h>
#include <sys/stat.h>
//#include <time.h>
#include <stdlib.h>
int main( void )
{
int rtnCod = 0;
int cnt = 0;
int num = 0;
int bBuf = 0;
int eBuf = 0;
int fSize = 0;
FILE* INFO = NULL;
struct stat st; /* for s...
char *inBuf; /* メモ...
char fileName[8] = "./a.gem";
char word[9] = "";
stat( fileName, &st );
fSize = st.st_size;
inBuf = (char*)malloc( fSize );
INFO = fopen( fileName, "r");
fread( inBuf, sizeof(char), fSize, INFO );
fclose( INFO );
// printf( "%s\n--end--\n", inBuf );
for( cnt = 0; fSize > cnt; cnt++ )
{
if( ' ' == inBuf[cnt] )
{
eBuf = cnt + 1;
snprintf( word, eBuf - bBuf, "%s", &(inBuf[b...
bBuf = cnt + 1;
num = strtol( word, NULL, 16 );
printf( "%x\n", num );
}
}
free( inBuf );
return( rtnCod );
}
int delta = START_CUE_POS;
int dOffset = setX(GRID_H * INTERVAL);
int note = ZERO;
int len = ZERO;
int left = ZERO;
int right = ZERO;
for( 時点数 )
{
barData取得
for( 各パート: cnt_beg, cnt_end )
{
note = getNoteM( barData, cnt_beg );
if( ONあり )
{
if( ZERO != offRsv[cnt_beg] )
{
left = getX(offRsv[cnt_beg]);
len = delta - left;
if( tgt == cnt_beg )
{
len += dOffset;
}
offRsv[cnt_beg] += setL(len);
vc_funcs_barList[cnt_beg].insert( offRsv...
vc_funcs_barList[ALL_PART].insert( offRs...
offRsv[cnt_beg] = ZERO;
}
if( noteが範囲内 )
{
offRsv[cnt_beg] = setX(delta) + key2Y((u...
if( tgtPart )
{
offRsv[cnt_beg] += dOffset;
}
}
}
else
{
if( (ZERO == note) && (ZERO != offRsv[cnt_be...
{
left = getX(offRsv[cnt_beg]);
len = delta - left;
if( tgt == cnt_beg )
{
len += dOffset;
}
offRsv[cnt_beg] += setL(len);
vc_funcs_barList[cnt_beg].insert( offRsv...
vc_funcs_barList[ALL_PART].insert( offRs...
offRsv[cnt_beg] = ZERO;
}
}
}
delta += GRID_H;
}
//int delta = START_CUE_POS;
//int dOffset = setX(GRID_H * INTERVAL);
//int note = ZERO;
//int len = ZERO;
int left = ZERO;
//int right = ZERO;
int ePos = ZERO;
int cPos = START_CUE_POS;
int offset = INTERVAL * GRID_H;
ePos = 最終位置
for( ; ePos > cPos; cPos += GRID_H )
{
for( 各パート: cnt_beg, cnt_end )
{
sPos = cPos;
if( tgt == cnt_beg )
{
sPos += offset;
}
lower = lower_bound(sPos);
if( end == lower )
{
continue;
}
note = getNote( *lower );
left = getX( *lower );
right = left + getL( *lower );
if( sPos == left )
{
ON予約
}
else( lとrの間 )
{
N予約
}
import torch ...
from torch.autograd import Variable ...
X = torch.randn( 4, 4, 4 )
prevX = Variable(X[-1:, :, :].data, requires_grad=False)
#print(X)
#print("="*80)
#print(prevX)
#prevX = None
X = torch.randn( 4, 4, 4 )
Xm1 = []
#print( Xm1 )
Xm1.append(prevX if prevX is not None else X[:1, :, :] *...
if prevX is not None:
# Xm2 = prevX
Xm2 = torch.cat((prevX, X[:-1, :, :]), 0)
else:
# Xm2 = torch.tensor(X[:1, :, :] * 0)
Xm2 = torch.cat((X[:1, :, :] * 0, X[:-1, :, :]), 0)
#print( Xm1 )
#print( Xm2 )
if len(X) > 1:
Xm1.append(X[:-1, :, :])
# Xm2 = torch.cat((Xm2,X[:-1, :, :]))
#print( Xm1 )
Xm1 = torch.cat(Xm1, 0)
#print( Xm1 )
#print( Xm2 )
source = torch.cat([X, Xm1], 2)
source2 = torch.cat((X, Xm2), dim=2)
#print( source )
#print("="*80)
#print( source2 )
#l = [X, Xm1]
#t = (X, Xm1)
#print(l)
#print(t)
#print(type(l))
#print(type(t))
■頻度ログ残し
生成したらID払出し(元種別番号+種別番号+セット番号+Index)
フラグとともに保持しておき
対位系のときにIDも送信
IDをログに残す
■中断再開とColab連続稼働
https://qiita.com/iZuno-K/items/453cbc023a477359f272
■数を絞って実現性証明
HHC
■手動でFP16
https://qiita.com/arutema47/items/d9e097f00b0b4934d07a
01G g1→gs1 11G 21G 31G 0DG 1DG 2DG 3DG 4DG D1G D2G D3G ...
learn sc1 sc2 sc3 sc4 scd t1d t2d t3d t4d t1d t2d t3d t4d
input random g1 gs1_8 gs2_s gs3_s random time1 time2 tim...
output1 g1 gs1 gs2 gs3 gs4 dr dr dr dr dr time1 time2 ti...
output2
source1
source2
動作 自動 自動 自動 自動 自動 自動 手動 手動 手動 手動 ...
切分け 1g - 2g 3g 4g dg
s + 8bit s + 8bit*2 s + 8bit*3 s + 8bit*4
https://colab.research.google.com/drive/19icmsmrvXL3Ozv4U...
#!/bin/bash
lNum=0
cNum=0
strBuf=`cat $1`
while read line
do
lNum=$(expr $lNum + 1)
CS=`echo $line | sed -e 's@[^ ]@@g'`
cNum=${#CS}
echo $lNum : $cNum
done << END
cat $strBuf
END
echo $lNum
終了行:
* 書式保持メモ [#sda4f9c8]
/* Curl Test *******************************************...
s4 cl_funcs::curlTest( void ) ...
{ ...
s4 rtnCod = RET_OK; ...
TCHAR strBuf[BUFF_SIZE_MERE] = _T(""); ...
http_client hC( _T("http://192.168.3.6:8000/gen/") )...
...
http_request request( methods::GET ); ...
auto res = hC.request( request ).get(); ...
...
// http_request request( methods::POST ); ...
// request.headers().add( _T("Content-Type"), _T("app...
// request.headers().add( _T("Content-Length"), _T("1...
// auto data = vector< u1 >( 10, 'A' ); ...
// ...
// request.set_body( data ); ...
// tstring str = uB.to_string(); ...
// ...
// auto t1( hC.request( methods::GET, str ) ); ...
// auto t1( hC.request( request ).get() );
// auto t1( response = hc.request(request).get();
// auto res = hC.request( request ).get();
// auto res = hC.request( methods::POST, _T(""), data...
// auto res = hC.request( methods::POST, _T(""), data...
// auto res = hC.request( methods::POST, _T("") ).get...
// http_response res = hC.request( methods::GET ).get...
...
for ( ; ; ) ...
{ ...
TCHAR body[BUFF_SIZE_MERE]; ...
_sntprintf_s( body, _countof(body), _TRUNCATE, ...
_T("%s"), (TCHAR*)(res.extract_str...
MessageBox( NULL, body, ...
APP_NAME, MB_ICONWARNING | MB_OK ); ...
...
// hC.request(methods::GET).then([](http_response...
// {
// TCHAR body[BUFF_SIZE_MERE]; ...
// _sntprintf_s( body, _countof(body), _TRUNC...
// _T("%s"), (TCHAR*)(res.extra...
// MessageBox( NULL, body, ...
// APP_NAME, MB_ICONWARNING | MB_...
//// // Print the status code.
//// std::wostringstream ss;
//// ss << L"Server returned returned status ...
//// std::wcout << ss.str();
////
//// // TODO: Perform actions here reading fr...
//// auto bodyStream = response.body();
////
//// // In this example, we print the length ...
//// ss.str(std::wstring());
//// ss << L"Content length is " << response....
//// std::wcout << ss.str();
// }); ...
// ...
// t1.then(
// [](http_response res)
// { ...
// TCHAR body[BUFF_SIZE_MERE]; ...
//// auto body2 = res.extract_string().get();
//// char body3[BUFF_SIZE_MERE];
//// snprintf( body3, _countof(body3), "%s", ...
// ...
//// MessageBox( NULL, (TCHAR*)msg.c_str(), ...
// _sntprintf_s( body, _countof(body), _TRUNC...
// _T("%s"), (TCHAR*)(res.extra...
//// MessageBox( NULL, (TCHAR*)(res.extract_s...
// MessageBox( NULL, body, ...
// APP_NAME, MB_ICONWARNING | MB_...
// }
// ).wait(); ...
...
...
break; ...
} ...
...
return( rtnCod ); ...
} ...
//*Curl Test *******************************************...
/* Write Schedule Patterns Drums ***********************...
s4 cl_nn::writeSch_MDG( u4_ms (&vd_mSet)[SCH_TYPE_NUM], ...
HANDLE vd_OUFO, HANDLE vd_OUFO_TG...
{ ...
s4 rtnCod = ZERO; ...
...
// u4_ms_it bufIt; ...
// s4 vLeft = ZERO; ...
// s4 vRight = ZERO; ...
// s4 len = ZERO; ...
//// s4 cnt = ZERO; ...
// ...
// ...
u4_ms_it lower; ...
u4_ms_it upper; ...
//// TCHAR strFmt[BUFF_SIZE_SHORT] = _T(""); ...
char strFmt[BUFF_SIZE_SHORT] = ""; ...
// s4 r[PARTS_NUM_MAIN] = { NEG, NEG, NEG, NEG }; ...
// s4 barData = ZERO; ...
// s4 spacer = ZERO; ...
// s4 sLen = ZERO; ...
// s4 tCnts = ONE; ...
// char eos[BUFF_SIZE_SHORT] = ".\n"; ...
s4 sPos = ZERO; ...
s4 cPos = ZERO; ...
s4 ePos = ZERO; ...
s4 vLen = ZERO; ...
s4 wLen = ZERO; ...
s4 cLen = ZERO; ...
...
vd_sch_conf;
...
for ( ; ; ) ...
{ ...
if( true == vd_mSet[DRUMS].empty() ) ...
{ ...
rtnCod = RET_NG; ...
break; ...
} ...
...
lower = vd_mSet[DRUMS].begin(); ...
upper = vd_mSet[DRUMS].end(); ...
// barData = *lower; ...
for( ; upper != lower; lower++ ) ...
{ ...
if( ZERO != sPos ) ...
{ ...
cPos = getX(*lower); ...
vLen = cPos - ePos; ...
wLen = ePos - sPos; ...
cLen = cPos - sPos; ...
if( ZERO == vLen ) ...
{ ...
continue; ...
} ...
else if( LONGEST_VOID_LEN_D < vLen ) ...
{ ...
if( SHORTEST_SENTS_LEN_D > wLen ) ...
{ ...
} ...
else ...
{ ...
// ePos = sPos + GRID_H; ...
if( NULL == vd_OUFO ) ...
{ ...
obj_nn.outDG( vd_mSet[DRUMS]...
} ...
else ...
{ ...
obj_nn.outMD( vd_mSet, sPos,...
} ...
} ...
sPos = cPos; ...
rePos = ePos; ...
ePos = cPos + GRID_H; ...
} ...
else ...
{ ...
if( SENTS_LEN_D <= cLen ) ...
{ ...
if( NULL == vd_OUFO ) ...
{ ...
obj_nn.outDG( vd_mSet[DRUMS]...
} ...
else ...
{ ...
obj_nn.outMD( vd_mSet, sPos,...
} ...
sPos = cPos; ...
} ...
rePos = ePos; ...
ePos = cPos + GRID_H; ...
} ...
} ...
else ...
{ ...
sPos = getX(*lower); ...
rePos = sPos + GRID_H; ...
ePos = sPos + GRID_H; ...
} ...
} ...
...
wLen = ePos - sPos; ...
if( SHORTEST_SENTS_LEN_D <= wLen ) ...
{ ...
if( NULL == vd_OUFO ) ...
{ ...
obj_nn.outDG( vd_mSet[DRUMS], sPos, ePos...
} ...
else ...
{ ...
obj_nn.outMD( vd_mSet, sPos, ePos, vd_OU...
} ...
} ...
...
break; ...
} ...
...
return( rtnCod ); ...
} ...
//*Write Schedule Patterns Drums ***********************...
*** https://qiita.com/okoppe8/items/b56499fc04e6c2193b9d ...
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'formatters': {
'production': {
'format': '%(asctime)s [%(levelname)s] %(pro...
'%(pathname)s:%(lineno)d %(message...
},
},
'handlers': {
'file': {
'class': 'logging.handlers.TimedRotatingFile...
'filename': '/var/log/django/django.log',
'formatter': 'production',
# 'level': 'INFO',
'when': 'D',
'interval': 1,
'backupCount': 14,
},
},
'loggers': {
'': {
'handlers': ['file'],
# 'level': 'INFO',
'propagate': False,
},
'django': {
'handlers': ['file'],
# 'level': 'INFO',
'propagate': False,
},
},
import sys
import os
import glob
import random
import shutil
import errno
args = sys.argv
try:
os.makedirs( "./test" )
os.makedirs( "./train" )
os.makedirs( "./valid" )
except OSError as e:
if e.errno != errno.EEXIST:
raise e
fileList = glob.glob( "./*.mid*" )
#print( "hello" )
#print( args[1] )
for file in fileList:
randNum = random.randint(0,11)
if 0 == randNum:
shutil.copy( file, "./test" )
elif 1 == randNum:
shutil.copy( file, "./valid" )
else:
shutil.copy( file, "./train" )
sys.exit()
#include <stdio.h>
#include <time.h>
#include <stdlib.h>
int main( void )
{
int rtnCod = 0;
char strArr[10][9] = { "", };
int intArr[10] = { 0, };
int cnt = 0;
int num = 0;
srand( (unsigned int)time( NULL ) );
for( cnt = 0; 10 > cnt; cnt++ )
{
intArr[cnt] = rand();
printf( "%x\r\n", intArr[cnt] );
snprintf( strArr[cnt], 9, "%x", intArr[cnt] );
printf( "%s\r\n", strArr[cnt] );
num = strtol( strArr[cnt], NULL, 16 );
printf( "%x\r\n", num );
}
return( rtnCod );
}
#include <stdio.h>
#include <sys/stat.h>
//#include <time.h>
#include <stdlib.h>
int main( void )
{
int rtnCod = 0;
int cnt = 0;
int num = 0;
int bBuf = 0;
int eBuf = 0;
int fSize = 0;
FILE* INFO = NULL;
struct stat st; /* for s...
char *inBuf; /* メモ...
char fileName[8] = "./a.gem";
char word[9] = "";
stat( fileName, &st );
fSize = st.st_size;
inBuf = (char*)malloc( fSize );
INFO = fopen( fileName, "r");
fread( inBuf, sizeof(char), fSize, INFO );
fclose( INFO );
// printf( "%s\n--end--\n", inBuf );
for( cnt = 0; fSize > cnt; cnt++ )
{
if( ' ' == inBuf[cnt] )
{
eBuf = cnt + 1;
snprintf( word, eBuf - bBuf, "%s", &(inBuf[b...
bBuf = cnt + 1;
num = strtol( word, NULL, 16 );
printf( "%x\n", num );
}
}
free( inBuf );
return( rtnCod );
}
int delta = START_CUE_POS;
int dOffset = setX(GRID_H * INTERVAL);
int note = ZERO;
int len = ZERO;
int left = ZERO;
int right = ZERO;
for( 時点数 )
{
barData取得
for( 各パート: cnt_beg, cnt_end )
{
note = getNoteM( barData, cnt_beg );
if( ONあり )
{
if( ZERO != offRsv[cnt_beg] )
{
left = getX(offRsv[cnt_beg]);
len = delta - left;
if( tgt == cnt_beg )
{
len += dOffset;
}
offRsv[cnt_beg] += setL(len);
vc_funcs_barList[cnt_beg].insert( offRsv...
vc_funcs_barList[ALL_PART].insert( offRs...
offRsv[cnt_beg] = ZERO;
}
if( noteが範囲内 )
{
offRsv[cnt_beg] = setX(delta) + key2Y((u...
if( tgtPart )
{
offRsv[cnt_beg] += dOffset;
}
}
}
else
{
if( (ZERO == note) && (ZERO != offRsv[cnt_be...
{
left = getX(offRsv[cnt_beg]);
len = delta - left;
if( tgt == cnt_beg )
{
len += dOffset;
}
offRsv[cnt_beg] += setL(len);
vc_funcs_barList[cnt_beg].insert( offRsv...
vc_funcs_barList[ALL_PART].insert( offRs...
offRsv[cnt_beg] = ZERO;
}
}
}
delta += GRID_H;
}
//int delta = START_CUE_POS;
//int dOffset = setX(GRID_H * INTERVAL);
//int note = ZERO;
//int len = ZERO;
int left = ZERO;
//int right = ZERO;
int ePos = ZERO;
int cPos = START_CUE_POS;
int offset = INTERVAL * GRID_H;
ePos = 最終位置
for( ; ePos > cPos; cPos += GRID_H )
{
for( 各パート: cnt_beg, cnt_end )
{
sPos = cPos;
if( tgt == cnt_beg )
{
sPos += offset;
}
lower = lower_bound(sPos);
if( end == lower )
{
continue;
}
note = getNote( *lower );
left = getX( *lower );
right = left + getL( *lower );
if( sPos == left )
{
ON予約
}
else( lとrの間 )
{
N予約
}
import torch ...
from torch.autograd import Variable ...
X = torch.randn( 4, 4, 4 )
prevX = Variable(X[-1:, :, :].data, requires_grad=False)
#print(X)
#print("="*80)
#print(prevX)
#prevX = None
X = torch.randn( 4, 4, 4 )
Xm1 = []
#print( Xm1 )
Xm1.append(prevX if prevX is not None else X[:1, :, :] *...
if prevX is not None:
# Xm2 = prevX
Xm2 = torch.cat((prevX, X[:-1, :, :]), 0)
else:
# Xm2 = torch.tensor(X[:1, :, :] * 0)
Xm2 = torch.cat((X[:1, :, :] * 0, X[:-1, :, :]), 0)
#print( Xm1 )
#print( Xm2 )
if len(X) > 1:
Xm1.append(X[:-1, :, :])
# Xm2 = torch.cat((Xm2,X[:-1, :, :]))
#print( Xm1 )
Xm1 = torch.cat(Xm1, 0)
#print( Xm1 )
#print( Xm2 )
source = torch.cat([X, Xm1], 2)
source2 = torch.cat((X, Xm2), dim=2)
#print( source )
#print("="*80)
#print( source2 )
#l = [X, Xm1]
#t = (X, Xm1)
#print(l)
#print(t)
#print(type(l))
#print(type(t))
■頻度ログ残し
生成したらID払出し(元種別番号+種別番号+セット番号+Index)
フラグとともに保持しておき
対位系のときにIDも送信
IDをログに残す
■中断再開とColab連続稼働
https://qiita.com/iZuno-K/items/453cbc023a477359f272
■数を絞って実現性証明
HHC
■手動でFP16
https://qiita.com/arutema47/items/d9e097f00b0b4934d07a
01G g1→gs1 11G 21G 31G 0DG 1DG 2DG 3DG 4DG D1G D2G D3G ...
learn sc1 sc2 sc3 sc4 scd t1d t2d t3d t4d t1d t2d t3d t4d
input random g1 gs1_8 gs2_s gs3_s random time1 time2 tim...
output1 g1 gs1 gs2 gs3 gs4 dr dr dr dr dr time1 time2 ti...
output2
source1
source2
動作 自動 自動 自動 自動 自動 自動 手動 手動 手動 手動 ...
切分け 1g - 2g 3g 4g dg
s + 8bit s + 8bit*2 s + 8bit*3 s + 8bit*4
https://colab.research.google.com/drive/19icmsmrvXL3Ozv4U...
#!/bin/bash
lNum=0
cNum=0
strBuf=`cat $1`
while read line
do
lNum=$(expr $lNum + 1)
CS=`echo $line | sed -e 's@[^ ]@@g'`
cNum=${#CS}
echo $lNum : $cNum
done << END
cat $strBuf
END
echo $lNum
ページ名: