"...git@developer.sourcefind.cn:OpenDAS/torchaudio.git" did not exist on "c6624fa6aa0154f5968b4bb40bd57c56349c41d7"
Unverified Commit f27f9158 authored by Dan Yao's avatar Dan Yao Committed by GitHub
Browse files

Merge pull request #993 from ROCmSoftwarePlatform/mha-train-develop-tinyadd

Two tiny udpates
parents ca9b152d 22214cae
......@@ -22,7 +22,7 @@ static inline void dumpBufferToFile(const char* fileName, T* data, size_t dataNu
std::ofstream outFile(fileName, std::ios::binary);
if(outFile)
{
outFile.write(reinterpret_cast<char*>(data), dataNumItems * sizeof(T));
outFile.write(reinterpret_cast<const char*>(data), dataNumItems * sizeof(T));
outFile.close();
std::cout << "Write output to file " << fileName << std::endl;
}
......
......@@ -130,10 +130,11 @@ struct GeneratorTensor_3<ck::bhalf_t>
template <typename T>
struct GeneratorTensor_4
{
std::default_random_engine generator;
std::mt19937 generator;
std::normal_distribution<float> distribution;
GeneratorTensor_4(float mean, float stddev) : generator(1), distribution(mean, stddev){};
GeneratorTensor_4(float mean, float stddev, unsigned int seed = 1)
: generator(seed), distribution(mean, stddev){};
template <typename... Is>
T operator()(Is...)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment